Unexpected token "{" error from this 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: Unexpected token "{" error from this script. (/thread-8265.html) |
Unexpected token "{" error from this script. - dasde - 05-26-2011 Hello I have this script on a map where I want two leaders to add 1 and 7 to a local int, when int is 8 a Swing door should unlock. But instead I just get the error "Unexpected token "{"" when I try to launch the game map. Here is the script: Code: void AddLocalVarInt(string& Unlock, int alVal); Thank you for your help RE: Unexpected token "{" error from this script. - Greven - 05-26-2011 (05-26-2011, 08:11 PM)dasde Wrote: Hello At the "void AddLocalVarInt(string& Unlock, int alVal);" There shouldnt be a ; at the end. RE: Unexpected token "{" error from this script. - dasde - 05-27-2011 Okay, now I get this error: (see attachment) Here is the full script: Code: //=========================================== RE: Unexpected token "{" error from this script. - Greven - 05-27-2011 hmm.. i dont know alot with the whole "if" thing but when it says mansion_1 is not declared it means it needs "". Like this SetLevelSwingDoorLocked("mansion_1", false); RE: Unexpected token "{" error from this script. - dasde - 05-27-2011 Fixed it by myself. This is my script for future googlers: Code: void OnLeverStateChange(string &in Lever1, int alState) |