Frictional Games Forum (read-only)
Unexpected EOF - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Unexpected EOF (/thread-14571.html)



Unexpected EOF - Nomad923 - 04-07-2012

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


RE: Unexpected EOF - JetlinerX - 04-07-2012

Get rid of the OnStart, and leave the OnEnter.



RE: Unexpected EOF - Your Computer - 04-07-2012

ActivateMonsterB :: SetMessage, fix the string.


RE: Unexpected EOF - Nomad923 - 04-07-2012

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


RE: Unexpected EOF - SilentStriker - 04-07-2012

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