The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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.
dasde Offline
Junior Member

Posts: 30
Threads: 6
Joined: May 2011
Reputation: 0
#1
Unexpected token "{" error from this script.

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
(This post was last modified: 05-26-2011, 08:11 PM by dasde.)
05-26-2011, 08:11 PM
Find


Messages In This Thread
Unexpected token "{" error from this script. - by dasde - 05-26-2011, 08:11 PM



Users browsing this thread: 1 Guest(s)