Frictional Games Forum (read-only)
Unexpected end of file.... :/ - 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: Unexpected end of file.... :/ (/thread-9609.html)



Unexpected end of file.... :/ - DarkEagle - 08-05-2011

Okay, i have a problem... I think i added everything,changed and looked around the code's for 3 time's still getting this error. Dodgy

Here is the code:
Code:
void OnStart()
{
AddUseItemCallback("item1","keykiller1","woodendoor1","dooropen",true);
SetEntityCallbackFunc("keykiller1","zombietime");
AddEntityCollideCallback("eater1","autoscript","killer",false,0);
AddEntityCollideCallback("Player","area","en",false,1);
AddEntityCollideCallback("Player","area","de",false,-1);
AddUseItemCallbackFunc("keyer","key_to_level2","ending_door","dooropen2", true);
}

void OnEnter()
{

}

void OnLeave()
{

}


void dooropen(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("woodendoor1",false,true);
}

void zombietime(string &in entity, string &in type)
{
StartEffectFlash(2,0.8,2);
SetEntityActive("servant_grunt_1",true);
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_1",0,"");
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_2",0,"");
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_3",0,"");
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_4",0,"");
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_5",0,"");
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_6",0,"");
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_4",0,"");
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_3",0,"");
SetPropHealth("ddoor1",0);
AddTimer("timerzombie",30,"killzombie");
}

void killzombie(string &in asTimer)
{
FadeEnemyToSmoke("servant_grunt_1",true);
}

void killer(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("eater1","PathNodeArea_7",0,"");
AddEnemyPatrolNode("eater1","PathNodeArea_8",0,"");

void en(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("box1enable",false);
}

void de(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("box1enable",true);
}

void dooropen2(string& asName, bool abLocked)
{
SetLevelDoorLocked("ending_door",false);
RemoveItem("keyer");
}



RE: Unexpected end of file.... :/ - Kurton - 08-05-2011

Your "killer" function isn't closed with a }


RE: Unexpected end of file.... :/ - DarkEagle - 08-05-2011

(08-05-2011, 06:29 PM)Kurton Wrote: Your "killer" function isn't closed with a }

Oh, lololol... sry... thank's. Smile