Frictional Games Forum (read-only)
Not another Unexpected End of file error. please help. - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Not another Unexpected End of file error. please help. (/thread-12217.html)



Not another Unexpected End of file error. please help. - jssjr90 - 12-31-2011

Knowing me this was bound to happen. I am getting an unexpected end of file, which means there is sompthing that is not structured right in the characters or some character is not where it should be. Can anybody help me de bug this. This may be long code but i looked at least 3 times over this and im stumped.


////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Wakeup", "Wakeupfunc", true, 1);
//________________________________________________________________________________


//Wake up scene
void Wakeupfunc(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
FadeIn(5);
StartPlayerLookAt("look1", 0.2, 1, "");
MovePlayerHeadPos( 0, -1.3, 0, 10, 0.10f);
AddTimer("", 10.0f, "look2");
}
void look2(string &in asTimer)
{
StartPlayerLookAt("look2", 0.2, 1, "");
AddTimer("", 10.0f, "Control");
FadeOut(10);
}
void Control(string &in asTimer)
{
MovePlayerHeadPos( 0, 0, 0, 10, 0.10f);
StopPlayerLookAt();
FadeIn(3);
TeleportPlayer("Wakearea");
SetPlayerActive(true);
}































void OnEnter()
{
//PreloadSound("rain-indoor1.snt");
PlaySoundAtEntity("rain", "rain-indoor1.ogg", "Player", 2.0f, false);
SetEntityPlayerInteractCallback("Thaughts14", "Thaughts14func", false);
SetEntityPlayerInteractCallback("painting14", "painting14func", false);
SetEntityPlayerInteractCallback("painting15", "painting15func", false);
SetEntityPlayerInteractCallback("painting16", "painting16func", false);
SetEntityPlayerInteractCallback("painting18", "painting18func", false);
SetEntityPlayerInteractCallback("painting17", "painting17func", false);
SetEntityPlayerInteractCallback("Thaughts1", "Thaughts1func", false);
SetEntityPlayerInteractCallback("Thaughts2", "Thaughts2func", false);
SetEntityPlayerInteractCallback("Thaughts3", "Thaughts3func", false);
SetEntityPlayerInteractCallback("Thaughts4", "Thaughts4func", false);
SetEntityPlayerInteractCallback("Thaughts5", "Thaughts5func", false);
SetEntityPlayerInteractCallback("Thaughts6", "Thaughts6func", false);
SetEntityPlayerInteractCallback("Thaughts7", "Thaughts7func", false);
SetEntityPlayerInteractCallback("Thaughts8", "Thaughts8func", false);
SetEntityPlayerInteractCallback("Thaughts9", "Thaughts9func", false);
SetEntityPlayerInteractCallback("Thaughts10", "Thaughts10func", false);
SetEntityPlayerInteractCallback("Thaughts11", "Thaughts11func", false);
SetEntityPlayerInteractCallback("Thaughts12", "Thaughts12func", false);
SetEntityPlayerInteractCallback("Thaughts13", "Thaughts13func", false);
SetEntityPlayerInteractCallback("Thaughts15", "Thaughts15func", false);
SetEntityPlayerInteractCallback("Thaughts16", "Thaughts16func", false);
SetEntityPlayerInteractCallback("Thaughts17", "Thaughts17func", false);
SetEntityPlayerInteractCallback("Thaughts18", "Thaughts18func", false);
//Cant go to bed until I complete tasks///////////////////////////////
SetEntityPlayerInteractCallback("Thaughts50", "Thaughts50func", false);
///////////////////////////////////////////////////////////////////////

//THUNDER LIGHT ENGINE
//Bang timer guide
//Bang 1 19.44

AddEntityCollideCallback("Player", "ThunderEngine", "ThunderEnginefunc", true, 1);

FadeLightTo("thunder1", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder2", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder3", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder4", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder5", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder6", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder7", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder8", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder9", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder10", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder11", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder12", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder13", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder14", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder15", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder16", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder17", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder18", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder19", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder20", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder21", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder22", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder23", 0, 0, 0, 0, 0, 0);
}

void ThunderEnginefunc(string &in asParent, string &in asChild, int alState)
{
AddTimer("", 19.67f,"Bang1on");
}




void Bang1on(string &in asTimer)
{
FadeLightTo("thunder1", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder2", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder3", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder4", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder5", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder6", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder7", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder8", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder9", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder10", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder11", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder12", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder13", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder14", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder15", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder16", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder17", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder18", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder19", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder20", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder21", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder22", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder23", 100, 100, 100, 100, -1, 0);
AddTimer("", 0.67f,"Bang1off");
}
void Bang1off(string &in asTimer)
{
FadeLightTo("thunder1", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder2", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder3", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder4", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder5", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder6", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder7", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder8", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder9", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder10", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder11", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder12", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder13", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder14", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder15", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder16", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder17", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder18", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder19", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder20", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder21", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder22", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder23", 0, 0, 0, 0, 0, 0);
AddTimer("", 0.67f,"Bang1on2");
}
void Bang1on2(string &in asTimer)
{
FadeLightTo("thunder1", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder2", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder3", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder4", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder5", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder6", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder7", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder8", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder9", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder10", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder11", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder12", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder13", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder14", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder15", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder16", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder17", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder18", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder19", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder20", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder21", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder22", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder23", 100, 100, 100, 100, -1, 0);
AddTimer("", 0.67f,"Bang1off2");
}
void Bang1off2(string &in asTimer)
{
FadeLightTo("thunder1", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder2", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder3", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder4", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder5", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder6", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder7", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder8", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder9", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder10", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder11", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder12", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder13", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder14", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder15", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder16", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder17", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder18", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder19", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder20", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder21", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder22", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder23", 0, 0, 0, 0, 0, 0);
AddTimer("", 0.67f,"Bang1on3");
}
void Bang1on3(string &in asTimer)
{
FadeLightTo("thunder1", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder2", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder3", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder4", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder5", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder6", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder7", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder8", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder9", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder10", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder11", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder12", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder13", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder14", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder15", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder16", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder17", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder18", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder19", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder20", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder21", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder22", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder23", 100, 100, 100, 100, -1, 0);
AddTimer("", 0.67f,"Bang1off3");
}
void Bang1off3(string &in asTimer)
{
FadeLightTo("thunder1", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder2", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder3", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder4", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder5", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder6", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder7", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder8", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder9", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder10", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder11", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder12", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder13", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder14", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder15", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder16", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder17", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder18", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder19", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder20", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder21", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder22", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder23", 0, 0, 0, 0, 0, 0);
AddTimer("", 0.67f,"Bang1on4");
}
void Bang1on4(string &in asTimer)
{
FadeLightTo("thunder1", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder2", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder3", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder4", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder5", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder6", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder7", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder8", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder9", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder10", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder11", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder12", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder13", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder14", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder15", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder16", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder17", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder18", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder19", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder20", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder21", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder22", 100, 100, 100, 100, -1, 0);
FadeLightTo("thunder23", 100, 100, 100, 100, -1, 0);
AddTimer("", 0.67f,"Bang1off4");
}
void Bang1off4(string &in asTimer)
{
FadeLightTo("thunder1", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder2", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder3", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder4", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder5", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder6", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder7", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder8", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder9", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder10", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder11", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder12", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder13", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder14", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder15", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder16", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder17", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder18", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder19", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder20", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder21", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder22", 0, 0, 0, 0, 0, 0);
FadeLightTo("thunder23", 0, 0, 0, 0, 0, 0);
}


























void painting14func(string &in asEntity)
{
SetMessage("Message", "painting14", 7);
}
void painting15func(string &in asEntity)
{
SetMessage("Message", "painting15", 7);
}
void painting16func(string &in asEntity)
{
SetMessage("Message", "painting16", 7);
}
void painting18func(string &in asEntity)
{
SetMessage("Message", "painting18", 7);
}
void painting17func(string &in asEntity)
{
SetMessage("Message", "painting17", 7);
}




void Thaughts1func(string &in asEntity)
{
SetMessage("Message", "Thaughts1", 7);
}
void Thaughts2func(string &in asEntity)
{
SetMessage("Message", "Thaughts2", 7);
}
void Thaughts3func(string &in asEntity)
{
SetMessage("Message", "Thaughts3", 7);
}
void Thaughts4func(string &in asEntity)
{
SetMessage("Message", "Thaughts4", 7);
}
void Thaughts5func(string &in asEntity)
{
SetMessage("Message", "Thaughts5", 7);
}
void Thaughts6func(string &in asEntity)
{
SetMessage("Message", "Thaughts6a", 7);
}
void Thaughts7func(string &in asEntity)
{
SetMessage("Message", "Thaughts7a", 7);
}
void Thaughts8func(string &in asEntity)
{
SetMessage("Message", "Thaughts8", 7);
}
void Thaughts9func(string &in asEntity)
{
SetMessage("Message", "Thaughts9", 7);
}
void Thaughts10func(string &in asEntity)
{
SetMessage("Message", "Thaughts10a", 7);
}
void Thaughts11func(string &in asEntity)
{
SetMessage("Message", "Thaughts11a", 7);
}
void Thaughts12func(string &in asEntity)
{
SetMessage("Message", "Thaughts12a", 7);
}
void Thaughts13func(string &in asEntity)
{
SetMessage("Message", "Thaughts13a", 7);
}
void Thaughts14func(string &in asEntity)
{
SetMessage("Message", "Thaughts14a", 7);
}

void Thaughts15func(string &in asEntity)
{
SetMessage("Message", "Thaughts15a", 7);
}
void Thaughts16func(string &in asEntity)
{
SetMessage("Message", "Thaughts16a", 7);
}
void Thaughts17func(string &in asEntity)
{
SetMessage("Message", "Thaughts17a", 7);
}
void Thaughts18func(string &in asEntity)
{
SetMessage("Message", "Thaughts18a", 7);
}



















//CANT SLEEP UNTIL I DO STUFF
//void Thaughts50func(string &in asEntity)
//{
//if (GetGlobalVarInt("TasksDone2") > 9)
//{
//FadeIn(2);
//ChangeMap("CH2 Lake View Manor 2nf floor","Wakeup", "", "");
//}
//else

//SetMessage("Message", "Thaughts50", 7);
//}





////////////////////////////
// Run when leaving map
void OnLeave()
{


}



RE: Not another Unexpected End of file error. please help. - flamez3 - 12-31-2011

That is ALOT OF LIGHTS TO FADE. You haven't closed the void OnStart() block.




RE: Not another Unexpected End of file error. please help. - jssjr90 - 12-31-2011

yea...I figured that out like a few min ago. Silly me. But the lights do not fade, so I half to set it to disable or able lights. Change all the FadeLightTo, to this one
"SetLightVisible(string& asLightName, bool abVisible);" fun! (sarcasm.)

Well that's the beautiful thing about scripting, you have a big code, but theres just ONE thing wrong. XD