Strange 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: Strange error (/thread-19464.html) |
Strange error - Fishnugget - 12-06-2012 Hello Guys I need a little help. My second map is way better than my first. Now I have a Problem with an Error. I try many things but this doesn't help. Each time I arrive in one of the maps the game crashes. Error http://i46.servimg.com/u/f46/17/76/85/90/2012_111.jpg What am I doing wrong? Thats the Script of the Level that doesn't Work: void OnStart() { AddEntityCollideCallback("Player", "ScriptArea_1", "Scary1", true, 1); AddEntityCollideCallback("Player", "ScriptArea_2", "TOTSCHRECK", true, 1); SetEntityCallbackFunc("key_laboratory_3", "OnPickup"); SetEntityCallbackFunc("key_laboratory_1", "OnPickup"); SetEntityCallbackFunc("key_laboratory_2", "OnPickup"); } void Scary1(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("", "laugh.snt", "Player", 0, false); SetEntityActive("corpse_male_1", true); AddPropImpulse("Scary1", -20, 0, -20, "world"); } void TOTSCHRECK(string &in asParent, string &in asChild, int alState) { PlaySoundAtEntity("", "bam.snt", "Player", 0, false); GiveSanityDamage(5.0f, true); SetEntityActive("grunt_body_part2_2", true); } void OnPickup(string &in asEntity, string &in type) { PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false); PlaySoundAtEntity("", "spruche.snt", "Player", 0, false); GiveSanityDamage(5.0f, true); SetEntityActive("ScriptArea_2", true); } void OnPickup(string &in asEntity, string &in type) { PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false); PlaySoundAtEntity("", "bam.snt", "Player", 0, false); GiveSanityDamage(5.0f, true); SetEntityActive("agrippa_head_1", true); } void OnPickup(string &in asEntity, string &in type) { PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false); GiveSanityDamage(5.0f, true); SetEntityActive("stuffed_dog_head_1", true); } //////////////////////////// // Run when leaving map void OnLeave() { } Thanks for helping RE: Strange error - The chaser - 12-06-2012 The error box says it... don't you see that you have "OnPickup" 3 times? Go to the level editor. There should be a "CallbackFunc". There, put OnPickup_1 for key_laboratory_1, and OnPickup_2 for the key_2, etc. Ok, now, rename the functions according to the desired effect. I don't know what order do you want to achieve, so do what I said and, hopefully, it should fix it. RE: Strange error - Fishnugget - 12-06-2012 thanks, sometimes im just an idiot x'D Thanks |