Frictional Games Forum (read-only)
[SCRIPT] Next script error - 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: [SCRIPT] Next script error (/thread-24946.html)



Next script error - MaksoPL - 03-29-2014

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");


RE: Next script error - 7heDubz - 03-29-2014

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");
}