![]() |
What's wrong with this simple 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: What's wrong with this simple script. (/thread-8707.html) |
What's wrong with this simple script. - JD Zombie - 06-20-2011 I've just copied the sample script from the wiki and added something to it as per instructional video but when I try to run the game after this alteration I get Quote:(15,1) unexpected token "{"error. Code: //////////////////////////// RE: What's wrong with this simple script. - Russ Money - 06-20-2011 void KeyOnDoor(string &in asItem, string &in asEntity); Take off the ; at the end. RE: What's wrong with this simple script. - JD Zombie - 06-20-2011 Thank you. That got it working and yay my key unlocks its door, this monumental feat calls for cigars and bubbly. Now I guess I missed the meaning of ; somewhere, if it's not a terribly complicated explanation why was that putting the brakes on things? RE: What's wrong with this simple script. - Russ Money - 06-20-2011 (06-20-2011, 01:05 PM)JD Zombie Wrote: Thank you. That got it working and yay my key unlocks its door, this monumental feat calls for cigars and bubbly. From my understanding semi-colons are used at the end of commands rather than functions. So it was treating it like a command, then seeing the open bracket after it made it cause the error. |