11-14-2016, 07:06 PM
I keep having the following error:
FATAL ERROR: Could not load script file 'custom_stories/betrayal/maps/Map1.hps'! main (75, 2) : ERR : Unexpected end of file
and I use the following script(this is the entire script used, the end is associated with the error, so the OnLeave):
What did I do wrong? Whoever explains it from Romulator or Mudbill (they usually explain it ) will be the best for me. Thx ^_^
FATAL ERROR: Could not load script file 'custom_stories/betrayal/maps/Map1.hps'! main (75, 2) : ERR : Unexpected end of file
and I use the following script(this is the entire script used, the end is associated with the error, so the OnLeave):
PHP Code:
////////////////////////////
// Run when entering map the first time
void OnStart()
{
FadeOut(0);
SetPlayerActive(false);
SetSanityDrainDisabled(true);
ShowPlayerCrossHairIcons(false);
AddTimer("fadein", 3, "Intro");
PlayMusic("janji_summer_memories.ogg", false, 1.2, 0, 1, false);
AddUseItemCallback("", "key_door_room_1_1", "level_room_1_2", "unlock_1", false);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
AddEntityCollideCallback("Player", "area_load_1_1", "Load1Enter", false, 1);
}
void Load1Enter(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("Load1Enter", 1)
}
void unlock_1(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("level_room_1_2", false);
PlaySoundAtEntity("", "unlock_door.snt", "level_room_1_2", 0, false);
RemoveItem("key_door_room_1_1");
}
void Intro(string &in asTimer)
{
if(GetLocalVarInt("Intro") < 3) {
if(asTimer == "fadein") {
TeleportPlayer("intro_" + GetLocalVarInt("Intro"));
FadeIn(1);
AddTimer("fadeout", 4, "Intro");
}
if(asTimer=="fadeout") {
FadeOut(1);
AddTimer("fadein", 1, "Intro");
AddLocalVarInt("Intro", 1);
}
}
else
{
TeleportPlayer("begin");
FadeIn(2);
SetPlayerActive(true);
SetSanityDrainDisabled(false);
ShowPlayerCrossHairIcons(true);
PlayMusic("janji_summer_memories.ogg", true, 0.2, 2, 2, false);
}
}
void note_room_1_1(string &in asEntity)
{
AddGlobalVarInt("key_1", 1);
if(GetGlobalVarInt("sanity_1") == 1){
AddGlobalVarInt("sanity_action_1", 1);
}
else{
AddGlobalVarInt("sanity_off_1", 1);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
if(GetLocalVarInt("Load1Enter") == 1){
SetupLoadScreen("load_1_1", "load_1_1", false, "map_2_edited.png");
}
}
What did I do wrong? Whoever explains it from Romulator or Mudbill (they usually explain it ) will be the best for me. Thx ^_^