I need help with my Custom Story! - 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) +--- Thread: I need help with my Custom Story! (/thread-24900.html) |
I need help with my Custom Story! - mrburritos31 - 03-22-2014 So here is my Intro Map Script, i'm trying to add a "Wake Up Effect" But when i try to launch my Custom Story it crashes! Any Suggestions? void OnStart() { SetPlayerActive(false); FadeOut(0); //FadePlayerRollTo(65, 20, 20); MovePlayerHeadPos(-1, -0.45, -1.1, 20, 1); AddTimer("activate_player", 3, "FadeIn"); SetLightVisible("BoxLight_1", false); SetPlayerSanity(50); AddUseItemCallback("OpenDoor", "MedicalKey", "level_wood_1", "UnlockLevelDoor", true); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////// void UnlockLevelDoor(string &in asItem, string &in asEntity) { SetLevelDoorLocked(asEntity, false); PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false); RemoveItem(asItem); GiveSanityBoostSmall(); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////// void OnLeave() { SetupLoadScreen("Loading","LoadScreen1",0,"LoadScreenImage1.jpg"); } //////////////////////////////////////////////////////////////////////////////////////// void FadeIn(string &in timer_name) { FadeIn(2); AddTimer("Start", 2, "WakeUp"); } void WakeUp(string &in timer_name) { if (timer_name == "Start") { SetLightVisible("Box_Light_1", true); AddTime("MoveHead", 1, "WakeUp"); } else if (timer_name == "MoveHead") { MovePlayerHeadPos(-0.5, -0.2, -1.1, 2, 2); FadePlayerRollTo(0, 1.7, 500); AddTimer("ActivatePlayer", 2, "WakeUp"); else if(timer_name == "ActivatePlayer"); { MovePlayerHeadPos(0, 0, 0, 2, 2); SetPlayerActive(true); } } } RE: I need help with my Custom Story! - Vale - 03-22-2014 can you copy down the crash message? It makes it easier to find the bug RE: I need help with my Custom Story! - mrburritos31 - 03-22-2014 (03-22-2014, 04:24 AM)valetheimpaler Wrote: can you copy down the crash message? It makes it easier to find the bug Here is the Crash Message: FATAL ERROR: Could not load script file 'custom_stories/Amnesia_Fading Away/maps/01.hps'! main(43, 1):ERR: Expected expression value RE: I need help with my Custom Story! - Vale - 03-22-2014 go down to line 43, get rid of the semicolon at the end else if(timer_name == "ActivatePlayer"); should be else if(timer_name == "ActivatePlayer") let me know if that fixes it btw, the crash usually says which line on the script it is (hence the 43) so try looking near the line of that number for help. If your text editor deosnt show line #, try looking up notepadd ++ or something RE: I need help with my Custom Story! - mrburritos31 - 03-22-2014 (03-22-2014, 04:32 AM)valetheimpaler Wrote: go down to line 43, get rid of the semicolon at the end Nope that didn't work unfortunately :/ RE: I need help with my Custom Story! - Vale - 03-22-2014 is the crash text any different? RE: I need help with my Custom Story! - mrburritos31 - 03-22-2014 (03-22-2014, 04:38 AM)valetheimpaler Wrote: is the crash text any different? Nope :/ RE: I need help with my Custom Story! - Vale - 03-22-2014 ok, while i was waiting found another error. Needs to be a bracket the line before the one i edited for you. Missing the opposite for the previous one. Also, you dont need that last bracket i dont think RE: I need help with my Custom Story! - mrburritos31 - 03-22-2014 (03-22-2014, 04:41 AM)valetheimpaler Wrote: ok, while i was waiting found another error. Needs to be a bracket the line before the one i edited for you. It still crashes :/ RE: I need help with my Custom Story! - Vale - 03-22-2014 hmmmmmmmmmmmmm post your current code |