The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting help needed
willochill Offline
Member

Posts: 73
Threads: 27
Joined: Apr 2011
Reputation: 0
#1
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.)
05-28-2011, 04:47 AM
Find


Messages In This Thread
Scripting help needed - by willochill - 05-28-2011, 04:47 AM
RE: Scripting help needed - by palistov - 05-28-2011, 07:18 AM
RE: Scripting help needed - by willochill - 05-28-2011, 03:55 PM
RE: Scripting help needed - by palistov - 05-29-2011, 10:29 AM



Users browsing this thread: 1 Guest(s)