Hey guys, I'm getting an error message on my script saying that there is an unexpected error...
How do I fix this?
Here is the crash report--
FATAL ERROR: Could not load script file 'custom_stories/My Custom Story(The Landlord)/maps/map02.hps'!
main (139, 2) : ERR : Unexpected end of file
Here is my FULL script, just incase there is a strange error in there somewhere...
////////////////////////////////////////
//Script Start
void OnStart()
{
//////////////////////////////////////////////////////////////////////////////
//Add the Lantern and 10 Tinderboxes when in Debug mode, LET THERE BE LIGHT!!!
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
}
{
AddUseItemCallback("", "bedroom_key", "locked_bedroom", "func_unlock", true);
AddEntityCollideCallback("Player", "killlights_script", "func_killlights", true, 1);
SetEntityPlayerInteractCallback("therentor_note", "func_enable", true);
AddEntityCollideCallback("Player", "gruntspawn_script", "spawn_grunt", true, 1);
AddEntityCollideCallback("Player", "redlight_script1", "func_redlight", true, 1);
AddEntityCollideCallback("Player", redlight_script2", "func_redlight2", true, 1);
}
}
//////////////////////////////
//script for unlocking bedroom
void func_unlock(string &in item, string &in door)
{
SetSwingDoorLocked("locked_bedroom", false, true);
PlaySoundAtEntity("", "unlock_door", door, 0, false);
RemoveItem("bedroom_key");
}
//////////////////////////////////////////////////////
//Script for enabling light script after grabbing note
void func_enable(string &in item)
{
SetEntityActive("killlights_script", true);
SetEntityActive("gruntspawn_script", true);
}
///////////////////////////////
//Script for killing the lights
void func_killlights(string &in asParent, string &in asChild, int alState)
{
SetLampLit("lightoff01", false, false);
SetLampLit("lightoff02", false, false);
SetLampLit("lightoff03", false, false);
SetLampLit("lightoff04", false, false);
SetLampLit("lightoff05", false, false);
SetLampLit("lightoff06", false, false);
SetLampLit("lightoff07", false, false);
SetLampLit("lightoff08", false, false);
SetLampLit("lightoff09", false, false);
SetLampLit("lightoff10", false, false);
SetEntityActive("red_light1", true);
SetEntityActive("red_light2", true);
SetEntityActive("armor_spawn1", true);
SetEntityActive("armor_spawn2", true);
SetSwingDoorClosed("slam_scare", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
PlayMusic("21_event_pit.ogg", false, 1.00, 0, 0, false);
GiveSanityDamage(10.0f, true);
}
////////////////////////////////
//Script for spawning REAL grunt
void spawn_grunt(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt_spawn", true);
AddEnemyPatrolNode("grunt_spawn", "PathNodeArea_3", 5, "");
AddEnemyPatrolNode("grunt_spawn", "PathNodeArea_4", 3, "");
AddEnemyPatrolNode("grunt_spawn", "PathNodeArea_5", 3, "");
AddEnemyPatrolNode("grunt_spawn", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("grunt_spawn", "PathNodeArea_7", 3, "");
AddEnemyPatrolNode("grunt_spawn", "PathNodeArea_8", 3, "");
AddEnemyPatrolNode("grunt_spawn", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("grunt_spawn", "PathNodeArea_10", 3, "");
AddEnemyPatrolNode("grunt_spawn", "PathNodeArea_11", 5, "");
}
///////////////////////////////////
//Script for redlights/creepy doors
void func_redlight(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
StartPlayerLookAt("lock_door", 2, 6, "");
AddTimer("look01", 1.5f, "look01");
}
void look01(string&in asTimer)
{
SetEntityActive("redlight_spawn1", true);
SetEntityActive("redlight_spawn2", true);
SetEntityActive("burntout1", false);
SetEntityActive("burntout2", false);
GiveSanityDamage(2.5f, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
SetEntityActive("redlight_script2", true);
SetSwingDoorClosed("lock_door", true, true);
SetSwingDoorLocked("lock_door", true, true);
{
SetPlayerActive(true);
StopPlayerLookAt();
}
}
void func_redlight2(string &in asParent, straing &in asChild, int alState)
{
SetPlayerActive(false);
StartPlayerLookAt("smash_door", 2, 6, "");
AddTimer("look02", 1.5f, "look02");
}
void look02(string&in asTimer)
{
SetEntityActive("redlight_spawn3", true);
SetEntityActive("redlight_spawn4", true);
SetEntityActive("burntout3", false);
SetEntityActive("burntout4", false);
GiveSanityDamage(2.5f, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
{
SetEntityActive("explode_script", true);
SetPlayerActive(true);
StopPlayerLookAt();
}
}
//////////////
//Script End
void OnLeave()
Can someone please help? Thanks a bunch!