script error[FIXED] - 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[FIXED] (/thread-16247.html) |
script error[FIXED] - SilentHideButFine - 06-17-2012 void OnStart() { SetEntityCallbackFunc("keynotwork", "PickUpKeyFunc"); AddEntityCollideCallback("servant_grunt_1", "ScriptArea_1", "remove", true, 1); AddUseItemCallback("borkenKey", "keynotwork", "cellar_wood01_1", "BrokenKeyWontOpenDoor", true); AddUseItemCallback("borkenKey", "Secret", "castle_4", "secretdoor1", true); AddUseItemCallback("", "hollow_needle_1", "cellar_wood01_1", "key1", true); AddEntityCollideCallback("Player", "HallowNeedle", "func1", true, 1);' AddEntityCollideCallback("Player", "ScriptArea_2", "func2", true, 1); AddEntityCollideCallback("servant_brute_1", "ScriptArea_3", "func3", true, 1); } void func3(string &in asParent, string &in asChild, int alState) { SetEntityActive("servant_brute_1", false); } void func2(string &in asParent, string &in asChild, int alState) { SetEntityActive("servant_brute_1", true); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_7", 2, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_8", 2, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_9", 2, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_10", 2, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_11", 2, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_12", 2, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_13", 2, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_14", 2, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_15", 2, ""); } void secretdoor1(string &in asItem, string &in asEntity) { SetSwingDoorLocked("castle_4", false, true); PlaySoundAtEntity("", "unlock_door", "castle_4", 0, true); RemoveItem("Secret"); GiveSanityBoostSmall(); } void key1(string &in asItem, string &in asEntity) { SetSwingDoorLocked("cellar_wood01_1", false, true); PlaySoundAtEntity("", "unlock_door", "cellar_wood01_1", 0, true); RemoveItem("hollow_needle_1"); GiveSanityBoostSmall(); } void func1(string &in asParent, string &in asChild, int alState) { SetEntityActive("hanging_prisoner_1", true); SetEntityActive("hanging_prisoner_2", true); SetEntityActive("hollow_needle_1", true); PlaySoundAtEntity("scream_sound", "24_iron_maiden.snt", "hanging_prisoner_2", 1, true); PlaySoundAtEntity("scream_sound1", "24_iron_maiden.snt", "hanging_prisoner_1", 1, true); SetMessage("Message", "HallowNeedle", 3); } void BrokenKeyWontOpenDoor(string &in asItem, string &in asEntity) { SetMessage("Message", "brokenkey", 5); RemoveItem("keynotwork"); PlaySoundAtEntity("", "locked_door.snt", "cellar_wood01_3", 0, true); } void remove(string &in asParent, string &in asChild, int alState) { SetEntityActive("servant_grunt_1", false); FadeEnemyToSmoke("servant_grunt_1", true); } void PickUpKeyFunc(string &in entity, string &in type) { if(type == "OnPickup") { SetPlayerActive(false); SetEntityActive("servant_grunt_1", true); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 2, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 2, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 2, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 2, ""); AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 2, ""); StartPlayerLookAt("castle_2", 5, 5, ""); PlaySoundAtEntity("", "react_scare.snt", "mansion_2", 0, false); GiveSanityDamage(40, true); SetSwingDoorLocked("cellar_wood01_3", false, true); GiveSanityBoostSmall(); AddTimer("StopLookAt", 3, "StopLookAtEvent"); } } void StopLookAtEvent(string &in asTimer) { SetPlayerActive(true); StopPlayerLookAt(); } here! it says error RE: script error - GrAVit - 06-17-2012 What is the error message? RE: script error - SilentHideButFine - 06-17-2012 (06-17-2012, 09:10 PM)GrAVit Wrote: What is the error message?Unexpeded file 92.2 RE: script error - Adny - 06-17-2012 Shouldn't line 71+73 be : void PickUpKeyFunc(string &in asEntity, string &in asType) //////revised type to asType { if(asType == "OnPickup") //////revised type to asType That's the only fishy thing I see in the script; all quotations, semicolons and callback syntax appear to be present and correct. For some reason, I don't feel like this well help too much : / I'll keep looking! RE: script error - SilentHideButFine - 06-18-2012 (06-17-2012, 10:20 PM)andyrockin123 Wrote: Shouldn't line 71+73 be :void PickUpKeyFunc(string &in asEntity, string &in asType) //////revised type to asType { if(asType == "OnPickup") //////revised type to asType what you mean? RE: script error - SilentHideButFine - 06-18-2012 Anyone know the problem? RE: script error - FlawlessHappiness - 06-18-2012 Unexpected end of file usually means you wanted to have 2 " ", but you mistakely only made 1 " so now it is open, and the file is ending, open. Though i can't seem to find any. If it is the OnPickup that makes the issue why not then try: SetEntityPlayerInteractCallback RE: script error - SilentHideButFine - 06-18-2012 (06-18-2012, 03:53 PM)beecake Wrote: Unexpected end of file usually means you wanted to have 2 " ", but you mistakely only made 1 " so now it is open, and the file is ending, open. well i cant find the issue :S |