Frictional Games Forum (read-only)

Full Version: quick question. script fatal error small script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I get a Fatal error when i load this script. anyone see the mistak


void OnStart()

{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)

{
SetEntityActive("servant_grunt_1", true);
}

////////////////////////////
// Run when leaving map
void OnLeave()
Your are missing braces after OnLeave:
Code:
void OnStart()
{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{
/* You Need brackets after a function definition */
}
(06-21-2012, 06:53 PM)Apjjm Wrote: [ -> ]Your are missing braces after OnLeave:
Code:
void OnStart()
{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{
/* You Need brackets after a function definition */
}
ty Big Grin