Game keeps crashing. - 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: Game keeps crashing. (/thread-9977.html) |
Game keeps crashing. - Khan - 08-25-2011 My game keeps crashing when I try to test something out, its a script related problem, I know, but I dont know wat is wrong, I cant find wat is causing the problem, I was making a key for a door, and when I tried to test it, it crashed. //////////////////////////// // Run when entering map void OnEnter() { AddUseItemCallback("MetalKey", "Door1", "Func01", false); } void Func01(string &in asItem, string &in asEntity) { RemoveItem(MetalKey); SetSwingDoorLocked(asEntity, false, true); PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false); } //////////////////////////// // Run when leaving map void OnLeave() { It crashes and sais MetalKey is not defined. wtf? } RE: Game keeps crashing. - X4anco - 08-25-2011 Have you made your extra-english file for the key? + SetSwingDoorLocked(asEntity, false, true); should be SetSwingDoorLocked("Door1", false, true); RE: Game keeps crashing. - Kyle - 08-25-2011 You're wrong X4anco. Khan, try this: Code: void OnEnter() RE: Game keeps crashing. - X4anco - 08-25-2011 Whooops RE: Game keeps crashing. - Khan - 08-25-2011 Still crashed RE: Game keeps crashing. - Kyle - 08-25-2011 Alright, I know why, It's because there's no OnStart function. xD Code: void OnStart() |