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
Storfigge Offline
Member

Posts: 101
Threads: 31
Joined: Sep 2012
Reputation: 0
#1
Unexpected token

Hey.
Anyone know why i get this?

main(1, 1) : ERR : Unexpected token '<Unrecognized token>'

Here's the code.

void OnStart()
{
AddEntityCollideCallback("Player", "voice_1", "voice1", true, 1);
AddEntityCollideCallback("Player", "voice_2", "voice2", true, 1);
AddUseItemCallback("", "stone_hammer_1", "padlock_1", "unlock", true);
AddUseItemCallback("", "key_4", "mansion_4", "unlock_door", true);
AddUseItemCallback("", "key_5", "level_wood_2", "unlock_level", true);
AddUseItemCallback("", "stone_hammer_1", "chest_small_1", "unlock_chest", true);
}

void voice1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "voice_acting_2.snt", "Player", 0, false);
SetEntityActive("voice_2", true);
StartPlayerLookAt("voice_2", 1, 2,"");
SetPlayerActive(false);
AddTimer("T1", 3.0f, "Timer_1");
}

void Timer_1(string &in asTimer)
{
SetPlayerActive(true);
}

void voice2(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "voice_acting_3.snt", "Player", 0, false);
StopPlayerLookAt();
SetPlayerActive(false);
AddTimer("T1", 40.0f, "Timer_2");
}

void Timer_2(string &in asTimer)
{
SetPlayerActive(true);
}

void unlock(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prison_1", false, true);
SetEntityActive("padlock_1", false);
SetEntityActive("padlock_broken_1", true);
PlaySoundAtEntity("", "25_attach_bar_metal.snt", "Player", 0, false);
}

void unlock_door(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_4", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_4", 0, false);
RemoveItem("key_4");
}

void unlock_level(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("level_wood_2", false);
PlaySoundAtEntity("", "unlock_door", "level_wood_2", 0, false);
RemoveItem("Key_5");
}

void unlock_chest(string &in asItem, string &in asEntity)
{
SetLeverStuckState("chest_small_1", 0, true);
PlaySoundAtEntity("", "06_break_wood.snt", "chest_small_1", 0, false);
CreateParticleSystemAtEntity("", "ps_hit_wood", "AreaBreakEffect", false);
}



void OnEnter()
{
PlayMusic("25_amb.ogg", true, 2, 2, 0, true);
}


void OnLeave()
{

}

02-17-2013, 06:09 PM
Find


Messages In This Thread
Unexpected token - by Storfigge - 02-17-2013, 06:09 PM
RE: Unexpected token - by MulleDK19 - 02-17-2013, 06:10 PM
RE: Unexpected token - by Storfigge - 02-17-2013, 06:26 PM
RE: Unexpected token - by MulleDK19 - 02-17-2013, 06:27 PM
RE: Unexpected token - by Storfigge - 02-17-2013, 06:30 PM



Users browsing this thread: 1 Guest(s)