Frictional Games Forum (read-only)
FATAL ERROR Token ´{´ - 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: FATAL ERROR Token ´{´ (/thread-17416.html)



FATAL ERROR Token ´{´ - DanyR07 - 08-02-2012

OK guys, im using the scripting guide: "From Noob to Pro", but i have a problem, when i get to the part when he teach us how to make the grunt get activate when u pick de key, i cant do that because i have a problem with (17/1) token. Here is the scripting



void OnStart()
{
SetEntityPlayerInteractCallback("key_study_1", "ActivateMonster", true);
}


void OnEnter()
{
AddDebugMessage("OnEnter!", false);
}


void OnLeave()
{
AddDebugMessage("OnLeave!", false);
}


void ActivateMonster(string &in item);
{ <-----(17/1) token whit amnesia say have a problem
SetEntityActive("servant_grunt_1", true)
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "Idle");
}
I really appreciate ur help guys!!!!!!!! HEERP



RE: FATAL ERROR Token ´{´ - Kazakarumariou - 08-02-2012

Try using This code

void OnStart()
{
SetEntityCallbackFunc("key_study_1", "ActivateMonster");
}

void ActivateMonster(string &in asEntity, string &in type)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 1, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 1, "");

void OnEnter()
{
AddDebugMessage("OnEnter!", false);
}

void OnLeave()
{
AddDebugMessage("OnLeave!", false);
}


RE: FATAL ERROR Token ´{´ - Your Computer - 08-02-2012

You have a semicolon in the function header. It's not supposed to be there. And you're missing a semicolon for SetEntityActive.