Frictional Games Forum (read-only)

Full Version: Unexpected Token
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ehh, I tried not getting on here that much but I seem to be having some trouble and this place is pretty good for help Smile.


The script is:

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "changemap", true, 1);
AddEntityCollideCallback("Player", "CreditsStart", "PlayerCollideArea", true, 1);
AddEntityCollideCallBack("Player", "MonsterTrigger", "PlayerCollideArea1", true, 1);
AddItemCallback("", "key", "mansion1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion1", 0.0f, false);
RemoveItem("key");
}

void changemap(string &in asParent, string &in asChild, int alState)
{
ChangeMap("map4.map", "spawnpoint", "flashback_flash.snt", "sanity_pant.snt");
}

void PlayerCollideArea(string &in Parent, string &in Child, int alState)
{
AddTimer("T1", 2.0f, "Timer_1");
}

void Timer_1(string &in Timer);
{
StartCredits("ending_daniel.ogg", false, "Ending", "MainCredits", 3);
}

void PlayerCollideArea(string &in Parent, string &in Child, int alState)
{
SetEntityActive("cloakedman_1", true);
ShowEnemyPlayerPosition("monster");
SetEnemyIsHallucination("monster");
}
void OnEnter()
{
}

void OnExit()
{
}

and the error is:
main (27, 1) : ERR : Unexpected token '{
Semicolons are suppose to end statements, not function headers.
Remove the semicolon at row 27
old:
Code:
void Timer_1(string &in Timer);
new:
Code:
void Timer_1(string &in Timer)
ohh, I did not notice that.......