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