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
Unexpected EOF
Nomad923 Offline
Junior Member

Posts: 46
Threads: 15
Joined: Dec 2011
Reputation: 2
#1
Unexpected EOF

You guys notice anything that would cause the "Unexpected end of file" error im getting?


void OnStart()
{

}

void OnEnter()
{
AddEntityCollideCallback("servant_grunt_1", "ScriptArea_1", "DisableMonster", true, 1);
AddEntityCollideCallback("servant_grunt_1", "ScriptArea_2", "ActivateMonsterB", true, 1);
AddEntityCollideCallback("servant_grunt_2", "ScriptArea_3", "StopLook", true, 1);
AddEntityCollideCallback("servant_grunt_2", "ScriptArea_4", "OpenClosetScare", true, 1);
PlayMusic("basements.ogg", true, 1.3f, 0.0f, 5, true);
SetEntityPlayerInteractCallback("key_study_4", "ActivateMonster", true);
}

void DisableMonster(string &in item)
{
SetEntityActive("servant_grunt_1", false);
}

void ActivateMonster(string &in item)
{
GiveSanityDamage(5.0f, true);
SetEntityActive("servant_grunt_1", true);
SetEntityActive("ScriptArea3", true);
StartPlayerLookAt("servant_grunt_1",4.5f,6.0f,"");
PlaySoundAtEntity("", "react_pant", "stool_wood_2", 0, false);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "idle");
AddTimer("",2.0f,"stoplook");
}

void ActivateMonsterB(string &in asParent, string &in asChild, int alState)
{
SetMessage("PersonalThoughts", Hide", 6);
SetEntityActive("servant_grunt_2", true);
StartPlayerLookAt("servant_grunt_2",4.5f,6.0f,"");
SetMoveObjectState("mansion_2", 1);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_6", 0, "idle");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_7", 0, "idle");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_8", 0, "idle");
}

void StopLook(string &in item, string &in entity)
{
StopPlayerLookAt();
}

void OpenClosetScare(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("cabinet_closed", false);
SetEntityActive("cabinet_open", true);
PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false);
}


void OnLeave()
{
}

[Image: qg_logo.png]
(This post was last modified: 04-07-2012, 02:16 AM by Nomad923.)
04-07-2012, 01:49 AM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#2
RE: Unexpected EOF

Get rid of the OnStart, and leave the OnEnter.

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

(This post was last modified: 04-07-2012, 01:53 AM by JetlinerX.)
04-07-2012, 01:52 AM
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: Unexpected EOF

ActivateMonsterB :: SetMessage, fix the string.

Tutorials: From Noob to Pro
04-07-2012, 01:54 AM
Website Find
Nomad923 Offline
Junior Member

Posts: 46
Threads: 15
Joined: Dec 2011
Reputation: 2
#4
RE: Unexpected EOF

Still not working....

edit: ill try "your computer's" idea

edit: i put the SetMessage into another func and fixed the string, its working now. Thanks for the help Big Grin

[Image: qg_logo.png]
(This post was last modified: 04-07-2012, 02:00 AM by Nomad923.)
04-07-2012, 01:54 AM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#5
RE: Unexpected EOF

i would suggest having the callbacks on OnStart or else the events will happen every time you enter the map

04-07-2012, 02:50 AM
Find




Users browsing this thread: 1 Guest(s)