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
Error: Unexpected token {
Neatherblade Offline
Junior Member

Posts: 19
Threads: 5
Joined: Jan 2011
Reputation: 0
#1
Error: Unexpected token {

After i have made this script



void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_grunt_1" , true);
}




{ <------- Complain about this one

AddUseItemCallback("", "Elevator_key", "elevator_door_1", "KeyOnDoor", true);

}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("elevator_door_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "elevator_door_1", 0.0f, true);
}

I get this Error: Unexpected token { and if i remove the script for the door and key it works, but why wont it work with the key script?
01-05-2011, 11:27 PM
Find


Messages In This Thread
Error: Unexpected token { - by Neatherblade - 01-05-2011, 11:27 PM
RE: Error: Unexpected token { - by ModManDann - 01-05-2011, 11:49 PM
RE: Error: Unexpected token { - by Mofo - 01-05-2011, 11:51 PM
RE: Error: Unexpected token { - by Neatherblade - 01-06-2011, 12:18 PM
RE: Error: Unexpected token { - by Russ Money - 01-06-2011, 12:22 PM
RE: Error: Unexpected token { - by Neatherblade - 01-06-2011, 12:38 PM
RE: Error: Unexpected token { - by ModManDann - 01-06-2011, 12:45 PM
RE: Error: Unexpected token { - by ThePaSch - 01-06-2011, 03:10 PM
RE: Error: Unexpected token { - by Neatherblade - 01-06-2011, 03:45 PM



Users browsing this thread: 1 Guest(s)