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
Fatal error: Expected identifier
Vennufius Offline
Junior Member

Posts: 8
Threads: 2
Joined: Jun 2012
Reputation: 0
#1
Fatal error: Expected identifier

So I'm having this small problem with my script. It keeps on having some kind of error, but I just can't simply find it. I would appreciate if someone could help me with this.

Here is my script atm:










void OnStart()
{
AddEntityCollideCallback("crowbar_joint_1", "BreakDoor", "CollideAreaBreakDoor", true, 1);
AddUseItemCallback("crowbarondoor", "crowbar_1", "castle_arched01_2", "UseCrowbarOnDoor", true);
AddUseItemCallback("crowbaronframe", "crowbar_1", "AreaUseCrowbar", "UseCrowbarOnDoor", true);
}


void UseCrowbarOnDoor(string &in asItem, string &in asEntity)
{
AddTimer("timer01", 0.2, "TimerAttachCrowbar");
PlaySoundAtEntity("pickupcrow","player_crouch.snt", "Player", 0.05, false);
RemoveItem("crowbar_1");
}


void TimerAttachCrowbar(string &in asTimer)
{
PlaySoundAtEntity("attachcrowbar","puzzle_place_jar.snt", "Player", 0, false);
SetEntityActive("crowbar_joint_1", true);
}


void CollideAreaBreakDoor(string &in asParent, string &in asChild, int alState)
{
GiveSanityBoostSmall();
PlayMusic("10_puzzle01.ogg", false, 0.7, 0.1, 10, false);
SetSwingDoorLocked("castle_arched01_2", false, false);
SetSwingDoorDisableAutoClose("castle_arched01_2", true);
SetSwingDoorClosed("castle_arched01_2", false, false);
PlaySoundAtEntity("break", "break_wood_metal", "AreaBreakEffect", 0, false);
CreateParticleSystemAtEntity("breakps", "ps_hit_wood", "AreaBreakEffect", false);
AddPropImpulse("castle_arched01_2", 0, 0, 3, "World");
SetEntityActive("crowbar_joint_1", false);
SetEntityActive("crowbar_broken_1", true);
AddTimer("pushdoor", 0.1, "TimerPushDoor");
AddDebugMessage("Break door!", false);
}


void TimerPushDoor(string &in asTimer)
{
AddPropImpulse("castle_arched01_2", -1, 2, -4, "World");
AddTimer("doorclose", 1.1, "TimerDoorCanClose");
}


void TimerDoorCanClose(string &in asTimer)
{
SetSwingDoorDisableAutoClose("castle_arched01_2", false);
}
07-05-2012, 02:58 AM
Find


Messages In This Thread
Fatal error: Expected identifier - by Vennufius - 07-05-2012, 02:58 AM
RE: Fatal error: Expected identifier - by Adny - 07-05-2012, 03:02 AM



Users browsing this thread: 1 Guest(s)