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()
{
}
|