Script 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 Error (/thread-25942.html) |
Script Error - giacomo9 - 08-23-2014 I have this error: ExcecuteString(1,1):ERR:No matching signatures to 'OnEnter' ExcecuteString(1,1):ERR:No matching signatures to 'OnLeave' Main(108,1):ERR:Unexpected end of file What's wrong? Here is complete script: // This runs when the map first starts================= void OnStart() { AddEntityCollideCallback("Player", "advice", "startadvice", true, 1); AddEntityCollideCallback("Player", "stopamb", "silence", true, 1); AddEntityCollideCallback("Player", "afteroil", "afteroilscare", true, 1); AddEntityCollideCallback("Player", "jebac", "jeebac", true, 1); AddEntityCollideCallback("Player", "ciach", "gameover1", true, 1); AddEntityCollideCallback("Player", "ciach_1", "gameover1", true, 1); AddEntityCollideCallback("Player", "maze2", "saw", true, 1); AddEntityCollideCallback("Player", "schiza", "startschiza", true, 1); AddEntityCollideCallback("Player", "baby", "babycry", true, 1); AddEntityCollideCallback("Player", "maze1", "scary1", true, 1); AddEntityCollideCallback("Player", "swinie", "swiniescary", true, 1); AddUseItemCallback("", "exitkey", "exitdoor", "exitunlock", true); AddUseItemCallback("", "beforekey", "beforedoor", "beforeunlock", true); SetEntityCallbackFunc("potion_oil_large_5", "OnPickup"); } void gameover1(string &in asParent, string &in asChild, int alState) { GivePlayerDamage(25, Slash, true, false); ) void silence(string &in asParent, string &in asChild, int alState) { StopMusic(0, 5); ) void gameover2(string &in asParent, string &in asChild, int alState) { GivePlayerDamage(25, Slash, true, false); ) void afteroilscare(string &in asParent, string &in asChild, int alState) { SetEntityActive("corpse_male_3", true); AddPropForce("corpse_male_3, 10000, 0, 0, "world"); PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false); } void startadvice(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("", "lastivo.snt", "Player", 0, false); AddTimer("", 47, "openlast"); } void startschiza(string &in asParent, string &in asChild, int alState) { PlayMusic("auditory.ogg", true, 1, 0, 5, false); } void babycry(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("", "insanity_baby_cry.snt", "Player", 0, false); } void saw(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("", "23_saw_voice2.snt", "Player", 0, false); } void openlast(string &in asTimer) { SetEntityActive("prison_1", false); SetEntityActive("prison_2", true); PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false); } void scary1(string &in asParent, string &in asChild, int alState) { SetEntityActive("corpse_male_2", true); PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false); } void jeebac(string &in asParent, string &in asChild, int alState) { SetEntityActive("swinie", true); } void swiniescary(string &in asParent, string &in asChild, int alState) { SetEntityActive("prosie", true); PlaySoundAtEntity("", "jebacswinie.snt", "Player", 0, false); } void exitunlock(string &in asItem, string &in asEntity) { SetSwingDoorLocked("exitdoor", false, true); PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false); RemoveItem(asItem); } void beforeunlock(string &in asItem, string &in asEntity) { SetSwingDoorLocked("beforedoor", false, true); PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false); RemoveItem(asItem); } void OnPickup(string &in asEntity, string &in type) { SetEntityActive("afteroil", true); ) RE: Script Error - PutraenusAlivius - 08-23-2014 GivePlayerDamage(25, "Slash", true, false); You forgot to add quotes in Slash at the callback function gameover1 and gameover2, Line 22 and 32 respectively. EDIT: AddPropForce("corpse_male_3", 10000, 0, 0, "world"); You forgot that closing quote in AddPropForce in the callback function AfterOilScare, Line 39. RE: Script Error - Romulator - 08-23-2014 Some of your voids have closing brackets instead of closing braces. PHP Code: void gameover1(string &in asParent, string &in asChild, int alState) RE: Script Error - giacomo9 - 08-23-2014 Thanks for help, everything works fine now. |