Frictional Games Forum (read-only)
quick question. script fatal error small script - 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: quick question. script fatal error small script (/thread-16378.html)



quick question. script fatal error small script - Hartmann - 06-21-2012

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()


RE: quick question. script fatal error small script - Apjjm - 06-21-2012

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 */
}



RE: quick question. script fatal error small script - Hartmann - 06-21-2012

(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