PLEASE tell me whats wrong.. - 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: PLEASE tell me whats wrong.. (/thread-10388.html) |
PLEASE tell me whats wrong.. - Itskody - 09-18-2011 void OnStart() { AddUseItemCallback("", "key_001", "door_001", "UsedKeyOnDoor", true); SetEntityPlayerInteractCallback("torch_001", "funclamp1", true); SetEntityPlayerInteractCallback("torch_002", "funclamp2", true); SetEntityPlayerInteractCallback("torch_003", "funclamp3", true); AddTimer("1", 2, "IntroTimer"); AddTimer("2", 4.5f, "IntroTimer"); AddTimer("3", 6.5f, "IntroTimer"); AddTimer("4", 9, "IntroTimer"); AddTimer("5", 11, "IntroTimer"); AddTimer("6", 14, "IntroTimer"); AddTimer("7", 19, "IntroTimer"); StartPlayerLookAt("wine01_1", 1, 2.0f, ""); FadeOut(0.0f); FadePlayerRollTo(80, 55, 55); SetPlayerActive(false); SetPlayerCrouching(true); FadeRadialBlurTo(0.10, 2); FadeRadialBlurTo(0.10, 2); SetEntityPlayerInteractCallback("lantern", "Monsters", true); } void Monsters(string &in entity) { SetEntityActive("invisible_monster_001", true); GiveSanityDamage(5.0f, true); PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); StartPlayerLookAt("Invisible_monster_001", 5, 7, ""); AddTimer("", 1.5f, "Scare"); SetPlayerActive(false); SetPlayerCrouching(true); } void Scare(string &in asTimer) { StopPlayerLookAt(); AddTimer("", 1.0f, "Scare2"); } void Scare2(string &in asTimer) { SetEntityActive("Invisable_monster_002", true); GiveSanityDamage(5.0f, true); PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); StartPlayerLookAt(Invisable_monster_002", 5, 7, ""); AddTimer("", 1.0f, "done"); } void IntroTimer(string &in asTimer) { if(asTimer == "1"){ PlayGuiSound("player_cough.snt", 2.0f); StopPlayerLookAt(); FadeIn(2.4f); } else if(asTimer == "2"){ FadePlayerRollTo(75, 1, 1); // "Tilts" the players head FadeOut(1.5f); } else if(asTimer == "3"){ StartPlayerLookAt("chair_wood02_broken_1", 1, 2.0f, ""); FadeIn(1.5f); PlayGuiSound("player_cough.snt", 2.0f); } else if(asTimer == "4"){ StopPlayerLookAt(); StartPlayerLookAt("stool_wood_1", 1, 2.0f, ""); FadeOut(1.5f); } else if(asTimer == "5"){ StopPlayerLookAt(); StartPlayerLookAt("candlestick_floor_1", 1, 2.0f, ""); FadeIn(1.5f); } else if(asTimer == "6"){ StopPlayerLookAt(); FadePlayerRollTo(0, 33, 33); // Change all settings to defaults FadeOut(1.5f); } else if(asTimer == "7"){ FadeImageTrailTo(0, 1.0f); FadeRadialBlurTo(0.0, 1); SetPlayerActive(true); FadeIn(1.5f); } } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("door_001", false, true); PlaySoundAtEntity("", "unlock_door", "door_001", 0, false); RemoveItem("key_001"); } void funclamp1(string &in asEntity) { AddLocalVarInt("LampsX", 1); if(GetLocalVarInt("LampsX")==3) { SetEntityActive("secret_door_001", false); SetEntityActive("secret_door_2", true); PlayGuiSound("quest_completed.snt", 2.0f); return; } } void funclamp2(string &in asEntity) { AddLocalVarInt("LampsX", 1); if(GetLocalVarInt("LampsX")==3) { SetEntityActive("secret_door_001", false); SetEntityActive("secret_door_2", true); PlayGuiSound("quest_completed.snt", 2.0f); return; } } void funclamp3(string &in asEntity) { AddLocalVarInt("LampsX", 1); if(GetLocalVarInt("LampsX")==3) { SetEntityActive("secret_door_001", false); SetEntityActive("secret_door_2", true); PlayGuiSound("quest_completed.snt", 2.0f); return; } } It says that line 138, 3 failed or whatever... like i dont understand why it keeps crashing when i open the game RE: PLEASE tell me whats wrong.. - Pr3d4t0r - 09-18-2011 Please an answer, it's frustrating us :/ Okay okay, seems like Itskody fixed it RE: PLEASE tell me whats wrong.. - Acies - 09-18-2011 "It says that line 138,"; look intently at line number 137, 138 and 139. The error lies somewhere there. The "lines" are referred to as numbers on the left hand side by notepad++. RE: PLEASE tell me whats wrong.. - Pr3d4t0r - 09-18-2011 (09-18-2011, 06:49 PM)Acies Wrote: "It says that line 138,"; look intently at line number 137, 138 and 139. The error lies somewhere there. The "lines" are referred to as numbers on the left hand side by notepad++.Lol I think he knows that ^^ But anyway, we found the solution : it was a mistake with the name of an entity. Thanks anyway for help |