Whats wrong with my script? - 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: Whats wrong with my script? (/thread-9421.html) |
Whats wrong with my script? - ZyLogicX - 07-27-2011 It says unexpected end of file? void OnEnter() { AddEntityCollideCallback("Player", "Intro_Quest_Area", "GetIntroQuest", true, 1); AddEntityCollideCallback("Player", "Intro_Complete_Area", "FinishIntroQuest", true, 1); } void GetIntroQuest(string &in asParent, string &in asChild, int alState) { AddQuest("introquest", "IntroQuest"); } void FinishIntroQuest(string &in asParent, string &in asChild, int alState) { CompleteQuest("introquest", "IntroQuest"); Void OnStart() { AddUseItemCallback("", "roomkey_1", "door_to_outside", "UsedKeyOnDoor", true); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("door_to_outside" , false , true); PlaySoundAtEntity("" , "unlock_door" , "door_to_outside" , 0, false); RemoveItem("roomkey_1"); } RE: Whats wrong with my script? - Kyle - 07-27-2011 Code: void FinishIntroQuest(string &in asParent, string &in asChild, int alState) RE: Whats wrong with my script? - ZyLogicX - 07-27-2011 I have it like this now but it says Expected identifier on 1, 25 what do I need to do? AddUseItemCallback("" , "roomkey_1" , "door_to_outside" , "UsedKeyOnDoor" , true); void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("door_to_outside" , false , true); PlaySoundAtEntity("" , "unlock_door" , "door_to_outside" , 0, false); RemoveItem("roomkey_1"); } void OnEnter() { AddEntityCollideCallback("Player", "Intro_Quest_Area", "GetIntroQuest", true, 1); AddEntityCollideCallback("Player", "Intro_Complete_Area", "FinishIntroQuest", true, 1); } void GetIntroQuest(string &in asParent, string &in asChild, int alState) { AddQuest("introquest", "IntroQuest"); } void FinishIntroQuest(string &in asParent, string &in asChild, int alState) { CompleteQuest("introquest", "IntroQuest"); } RE: Whats wrong with my script? - Kyle - 07-27-2011 Is this all of your script? You're missing a void OnStart() function and also should put those AddEntityCollideCallbacks from void OnEnter() into void OnStart() |