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
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: Scripting: unexpected end of file

AddTimer("", 2.0, "StopLook");


wasn't declared, fixed now; you missed a quotation mark.

I rate it 3 memes.
07-05-2012, 12:48 AM
Find
drunkmonk Offline
Member

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

(07-05-2012, 12:48 AM)andyrockin123 Wrote: AddTimer("", 2.0, "StopLook");


wasn't declared, fixed now; you missed a quotation mark.
Well isn't that just a little embarrissing lol. It works great now, thank you very much! Big Grin
07-05-2012, 12:51 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#4
RE: Scripting: unexpected end of file

(07-05-2012, 12:51 AM)drunkmonk Wrote: Well isn't that just a little embarrissing lol. It works great now, thank you very much! Big Grin
No problem; I know its always nice to have a second pair of eyes look over something!

I rate it 3 memes.
07-05-2012, 12:53 AM
Find




Users browsing this thread: 1 Guest(s)