Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved Unexpected EOF
Author Message
NoMaD923 Offline
Junior Member

Posts: 40
Joined: Dec 2011
Reputation: 2
Post: #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: 29121122131am_41f00.png]
(This post was last modified: 04-07-2012 02:16 AM by NoMaD923.)
04-07-2012 01:49 AM
Find all posts by this user Quote this message in a reply
JetlinerX Offline
Senior Member

Posts: 601
Joined: Jun 2011
Reputation: 19
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,242
Joined: Jul 2011
Reputation: 216
Post: #3
RE: Unexpected EOF
ActivateMonsterB :: SetMessage, fix the string.

Tutorials: From Noob to Pro
04-07-2012 01:54 AM
Visit this user's website Find all posts by this user Quote this message in a reply
NoMaD923 Offline
Junior Member

Posts: 40
Joined: Dec 2011
Reputation: 2
Post: #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: 29121122131am_41f00.png]
(This post was last modified: 04-07-2012 02:00 AM by NoMaD923.)
04-07-2012 01:54 AM
Find all posts by this user Quote this message in a reply
SilentStriker Offline
Posting Freak

Posts: 939
Joined: Jul 2011
Reputation: 39
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)