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: unexpected end of file
drunkmonk Offline
Member

Posts: 109
Threads: 7
Joined: Jun 2012
Reputation: 4
#1
Scripting: unexpected end of file

Hi everyone, i'm having some trouble with the script for one of my maps and I don't know what the problem is. When ever I try to test it, I get an error message saying ERR: unexpected end of file.

This is my script

void OnStart()
{
SetPlayerLampOil(0);
FadeOut(0);
FadeIn(5);
AddTimer("", 3.0, "Begin");
AddEntityCollideCallback("Player", "Monster_Spawn", "monsterspawn", true, 1);
}
void Begin(string &in asTimer)
{
SetMessage("Messages", "Setting", 0);
}
void monsterspawn(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
StartPlayerLookAt("servant_grunt_1", 10, 10, "");
AddTimer("", 2.0, "StopLook);
AddTimer("", 3.0, "MonsterPath");
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
}
void StopLook(string &in asTimer)
{
StopPlayerLookAt();
}
void MonsterPath(string &in asTimer)
{
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEntityCollideCallback("servant_grunt_1", "Monster_Path", "NewPath", true, 1);
}
void NewPath(string &in asParent, string &in asChild, int alState)
{
ClearEnemyPatrolNodes("servant_grunt_1");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
AddEntityCollideCallback("servant_grunt_1", "Grunt_Open_Doors", "OpenDoors", true, 1);
}
void OpenDoors(string &in asParent, string &in asChild, int alState)
{
AddPropImpulse("cabinet_simple_1", -10.0, 0, 0, "World");
}
void OnLeave()
{
}
07-05-2012, 12:41 AM
Find


Messages In This Thread
Scripting: unexpected end of file - by drunkmonk - 07-05-2012, 12:41 AM
RE: Scripting: unexpected end of file - by Adny - 07-05-2012, 12:48 AM
RE: Scripting: unexpected end of file - by Adny - 07-05-2012, 12:53 AM



Users browsing this thread: 1 Guest(s)