Unexpected Token - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Unexpected Token (/thread-13564.html) |
Unexpected Token - A.I. - 02-25-2012 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 . 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 '{ RE: Unexpected Token - Your Computer - 02-25-2012 Semicolons are suppose to end statements, not function headers. RE: Unexpected Token - LulleBulle - 02-25-2012 Remove the semicolon at row 27 old: Code: void Timer_1(string &in Timer); Code: void Timer_1(string &in Timer) RE: Unexpected Token - A.I. - 02-25-2012 ohh, I did not notice that....... |