Script 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 - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Script Fatal Error (/thread-18888.html) |
Script Fatal Error - TheFakeSilhouette - 10-23-2012 I need some help with this, I'm new so I don't know what's wrong. Whenever I start up my custom story I get this error message: FATAL ERROR: Could not load script file 'custom_stories/Map Test 3/maps/test.hps'! main (4,2) : ERR : No matching signatures to 'AddUseItemCallBack(string@&, string@&, string@&, string@&, const bool)' main (5,2) : ERR : No matching signatures to 'AddUseItemCallBack(string@&, string@&, string@&, string@&, const bool)' main(27,22) : ERR : Expected')' or ',' This is what I have gotten so far: void OnStart() { SetLocalVarInt("DoorLocked", 1); AddUseItemCallBack("", "key_laboratory_1", "level_wood_1", "UsedKeyOnDoor", true); AddUseItemCallBack("", "key_tomb_1", "mansion_2", "UsedKeyOnDoor2", true); SetEntityPlayerInteractCallback("mansion_2", "UsedKeyOnDoor3", false); } void OnEnter() { } void OnLeave() { } void UsedKeyOnDoor(string &in asitem, string &in asdoor) { SetLevelDoorLocked("level_wood_1", false); PlayGuiSound("unlock_door.snt", 100); RemoveItem("key_laboratory_1); } void UsedKeyOnDoor2(string &in asitem, string &in asdoor) { SetSwingDoorLocked("mansion_2", false, true); PlayGuiSound("unlock_door.snt", 100") RemoveItem("key_tomb_1"); SetLocalVarInt("DoorLocked", 0); } void UsedKeyOnDoor3(string &in asEntity) { if(GetLocalVarInt("DoorLocked") == 1) { SetMessage("Messages", "Doorlock2", 3); } } RE: Script Fatal Error - Adny - 10-23-2012 Hello! In the line: RemoveItem("key_laboratory_1); You missed the closing quotation mark (the one on the right side of key_laboratory_1). Also, you misspelled the function: AddUseItemCallBack, the B should not be capitalized; Callback is one word. Hope that helped RE: Script Fatal Error - TheFakeSilhouette - 10-23-2012 Thanks, that helped. Though now I have another problem, on start up it does this: FATAL ERROR: Could not load script file 'custom_stories/Map Test 3/maps/test.hps'! main (38,2) : ERR : Unexpected end of file RE: Script Fatal Error - Adny - 10-23-2012 Ah, got it: PlayGuiSound("unlock_door.snt", 100") Remove the quotation after the 100. RE: Script Fatal Error - TheFakeSilhouette - 10-23-2012 Awesome, thanks for your help! It's working now. |