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
A.I. Offline
Member

Posts: 114
Threads: 16
Joined: Feb 2012
Reputation: 2
#1
Unexpected Token

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 '{
(This post was last modified: 02-25-2012, 02:38 AM by A.I..)
02-25-2012, 01:46 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Unexpected Token

Semicolons are suppose to end statements, not function headers.

Tutorials: From Noob to Pro
02-25-2012, 02:35 AM
Website Find
LulleBulle Offline
Member

Posts: 101
Threads: 33
Joined: Feb 2012
Reputation: 0
#3
RE: Unexpected Token

Remove the semicolon at row 27
old:
void Timer_1(string &in Timer);
new:
void Timer_1(string &in Timer)
02-25-2012, 02:37 AM
Find
A.I. Offline
Member

Posts: 114
Threads: 16
Joined: Feb 2012
Reputation: 2
#4
RE: Unexpected Token

ohh, I did not notice that.......
02-25-2012, 02:37 AM
Find




Users browsing this thread: 1 Guest(s)