Fatal Error - 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Fatal Error (/thread-7441.html) |
Fatal Error - vansd - 04-17-2011 Look at my code void OnStart() { // use "ScriptArea_1" on "servunt_grunt_1" enemy => calls "MonsterFunc1" AddUseItemCallback("", "key_tomb_2", "prison_2", "KeyOnDoor", true); // use "key_tomb_3" on "castle_4" door => calls "KeyOnDoor" AddUseItemCallback("", "key_tomb_3", "castle_4", "KeyOnDoor", true); } void MonsterFunc1(string &in asParent, string &in asChild , int alState) { SetEntityActive("servant_grunt_1" , true); void KeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("castle_4", false, true); RemoveItem(asItem); PlaySoundAtEntity("", "unlock_door.snt", "castle_4", 0.0f, true); } I have fatal error. Unexpected end of the file. I can't understand what i did wrong. Help! RE: Fatal Error - MrBigzy - 04-17-2011 Put a } after SetEntityActive("servant_grunt_1" , true); RE: Fatal Error - vansd - 04-17-2011 And I have another question My scrip with monster worked, but now it isn't working. Why? RE: Fatal Error - Linus Ă…gren - 04-17-2011 void MonsterFunc1(string &in asParent, string &in asChild , int alState) { SetEntityActive("servant_grunt_1" , true); } You forgot closing bracket |