Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unexpected token "{" error from this script.
Greven Offline
Member

Posts: 106
Threads: 13
Joined: May 2011
Reputation: 3
#2
RE: Unexpected token "{" error from this script.

(05-26-2011, 08:11 PM)dasde Wrote: 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:

void AddLocalVarInt(string& Unlock, int alVal);
{

        if(GetLocalVarInt("Unlock")==8)
        {
           SetLevelSwingDoorLocked(mansion_1, false);
          
        }
}    
void OnLeverStateChange(string &in Lever1, int alState)
{

    AddDebugMessage(Lever1 + "'s current state: " + alState, false);

    if (alState == -1)
    {
     AddLocalVarInt("Unlock", 1);

    }
}

Thank you for your help

At the "void AddLocalVarInt(string& Unlock, int alVal);" There shouldnt be a ; at the end.

[WIP] Recidivus
(This post was last modified: 05-26-2011, 09:09 PM by Greven.)
05-26-2011, 09:09 PM
Find


Messages In This Thread
RE: Unexpected token "{" error from this script. - by Greven - 05-26-2011, 09:09 PM



Users browsing this thread: 1 Guest(s)