![]() |
Whats wrong with my script? - 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: Whats wrong with my script? (/thread-16655.html) |
Whats wrong with my script? - lbrosious96 - 07-01-2012 Im getting an unexpected ending at line 42,2, and i have tried everything! please help Code: void OnStart() RE: Whats wrong with my script? - Adny - 07-01-2012 You left the function blank for two of your callbacks: AddEntityCollideCallback("Player", "door_shut_1", "door_shut_collide", string& asFunction, true, 1); AddEntityCollideCallback("Player", "closetdoor", "closetopen", string& asFunction, true, 1); Also, the syntax for the function "ActivateMonster" should be asEntity, not item. RE: Whats wrong with my script? - Cruzore - 07-01-2012 as long as "string &in" is there, it doesn't matter what you name it. it can be asEntity, item or anything. I tried it out by replacing it with "lolz" and it worked. It's just good to name it asEntity or entity, to remember what it stands for so you don't have to look at the script functions page again. |