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:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script File crashing
willochill Offline
Member

Posts: 73
Threads: 27
Joined: Apr 2011
Reputation: 0
#1
Script File crashing

so i just started scripting one of my maps and i went on it to test it and it's crashing and saying this error:
FATAL ERROR: Could not load script file (blahbitty blah, map file name)
main (5,1) :ERR :Unexpected token '{'

Can you take a look at my script so far and see what ive done wrong?


void OnStart()
{
PlayMusic("amb_guardian.ogg", true, 1.0f, 0, 0, true);
}
{
AddUseItemCallback("", "bone_saw_2", "wooden_boards_block_1", "SawGruntAlert", true);
}
void SawGruntAlert(string &in asItem, string &in asEntity)
{
SetEntityActive("wooden_boards_block_1", false);
SetEntityActive("wooden_boards_block_broken_1", true);
PlaySoundAtEntity("", "23_saw2.snt", "Player", 0, false);
AddTimer("", 1, "TimerFunc");
AddTimer("", 1, "TimerFunc2");
}
void TimerFunc(string &in asTimer)
{
SetEntityActive("servant_grunt_1", true);
}
void TimerFunc2(string &in asTimer)
{
StopSound("23_saw2.snt", 0f);
}
05-28-2011, 02:28 AM
Find


Messages In This Thread
Script File crashing - by willochill - 05-28-2011, 02:28 AM
RE: Script File crashing - by Tanshaydar - 05-28-2011, 02:44 AM
RE: Script File crashing - by willochill - 05-28-2011, 03:31 AM
RE: Script File crashing - by Tanshaydar - 05-28-2011, 11:10 AM
RE: Script File crashing - by willochill - 05-28-2011, 03:58 PM
RE: Script File crashing - by Tanshaydar - 05-28-2011, 03:58 PM
RE: Script File crashing - by willochill - 05-28-2011, 04:00 PM
RE: Script File crashing - by Kyle - 05-28-2011, 04:07 PM
RE: Script File crashing - by Kyle - 05-28-2011, 04:04 PM
RE: Script File crashing - by willochill - 05-28-2011, 04:12 PM



Users browsing this thread: 1 Guest(s)