Frictional Games Forum (read-only)

Full Version: Next script error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello. I got a new script error. ExecuteString (1,1) ERR: No Matching signature of OnLeave()
main (9,35): ERR: Unexpected token
That's my 2 script:

void OnStart ()
{
AddEntityCollideCallback("Player","monster1","Monster",true,1);
}

void Monster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt1",true);
ShowEnemyPlayerPosition("grunt1");
Your Code
Code:
void OnStart ()
{
AddEntityCollideCallback("Player", "monster1", "Monster", true, 1);
}

void Monster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt1", true);
ShowEnemyPlayerPosition("grunt1");

I added more spacing (not necessary but good for looking back through the code and ridding it of pesky bugs)
and at the end you were missing a }

Changed Code
Code:
void OnStart ()
{
AddEntityCollideCallback("Player","monster1","Monster",true,1);
}

void Monster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt1",true);
ShowEnemyPlayerPosition("grunt1");
}