Scripting help needed
Okay so im scripting this file, and whenever i script maps it seems like SOMETHING ALWAYS has to go wrong. This time it crashes and says:
FATAL ERROR: Could not load (script file)!
main (21, 1) :ERR :Expected expression value
main (27, 1) :ERR :Expected expression value
I copied and pasted the script so far into this thread, plz tell me what im doing wrong cuz im starting to get pissed off, seems like i always mess up one tiny little thing that crashes the entire map.
void OnStart()
{
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 4.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 2.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 2.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_16", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_17", 2.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_18", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_19", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_20", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", 2.0f, "");
AddEntityCollideCallback("Player", "AreaActivateGrunt", "Func01", false, 1);
AddEntityCollideCallback("servant_grunty_1", "AreaDisableGrunt", "Func02", false, 1);
PlayMusic("00_creak.ogg", true, 1.0f, 0.0f, 0, true);
}
void Func01(string &in asParent, string &in asChild, int alState)
{
if (HasItem("lantern_1") == true)
{
SetEntityActive("servant_grunt_1", true);
RemoveEntityCollideCallback("Player", "AreaActivateGrunt");
return;
}
}
void Func02(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", false);
}
(This post was last modified: 05-28-2011, 04:47 AM by willochill.)
|