unexpected end of file, what's the problem?
Hey to all,
i was scripting 4 hours yet, and i added some timers, then my Custom Story don't works anyway! And there was an Error:
FATAL ERROR: Could not load script file 'custom_stories/House of Nightmare/maps/HoNmapSTART_STRT.hps'!
main (148,2) : ERR : Unexpected end of file
What is the Problem in my .hps file here?:
////////////////////////////
// Run first time starting map
void OnStart()
{
GiveItemFromFile("lantern", "lantern.ent");
AddEntityCollideCallback("Player", "enemy2_1_obj_wnodes_scf", "Enemy21ObjWnodesScf_1", true, 1);
AddUseItemCallback("", "doorkey_door_hon_scarechamber_obj_obj", "door_hon_scarechamber_obj", "DoorKeyDoorHonScarechamberObjObj_1", true);
AddEntityCollideCallback("Player", "carbinet_monster_smash_scf", "CarbinetMonsterSmashSCF_1", true, 1);
AddEntityCollideCallback("Player", "sc_door_smash_scf", "SCDoorSmashSCF_1", true, 1);
AddEntityCollideCallback("Player", "sc_go_slower_scf", "SCGoSlowerSCF_1", true, 1);
AddEntityCollideCallback("Player", "sc_smash_chest_open_scf", "SCSmashChestOpenSCF_1", true, 1);
AddEntityCollideCallback("Player", "sc_port_sc_scf", "SCPortSCSCF_1", true, 1);
}
void Enemy21ObjWnodesScf_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("enemy2_1_obj_wnodes", true);
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_10", 4, "");
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_11", 4, "");
ShowEnemyPlayerPosition("enemy2_1_obj_wnodes");
AddTimer("Timer_1", 4, "Timer_LookAt_1");
AddTimer("Timer_1_2", 4, "Timer_LookAt_1");
}
void Timer_LookAt_1(string &in asTimer)
{
string x = asTimer;
if (x == "Timer_1")
{
StartPlayerLookAt("enemy2_1_obj_wnodes");
FadeIn(1);
}
else if (x == "Timer_1_2")
{
StopPlayerLookAt();
PlaySoundAtEntity("", "react_sigh.snt", "Player", 0, false);
}
}
void DoorKeyDoorHonScarechamberObjObj_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_hon_scarechamber_obj", false, false);
PlaySoundAtEntity("unlock_door.ogg", "unlock_door.snt", "door_hon_scarechamber_obj", 0, false);
RemoveItem("doorkey_door_hon_scarechamber_obj_obj");
AddDebugMessage("KeyOnDoor", false);
AddTimer("Timer_2", 2, "Timer_LookAt_2");
AddTimer("Timer_2_2", 2, "Timer_LookAt_2");
}
void Timer_LookAt_2(string &in asTimer)
{
string x = asTimer;
if (x == "Timer_2")
{
StartPlayerLookAt("door_hon_scarechamber_obj");
FadeIn(3);
}
else if(x == "Timer_2_2)
{
StopPlayerLookAt();
SetPlayerCrouching(false);
}
}
void CarbinetMonsterSmashSCF_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("enemy1_1_obj_wnodes", true);
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_12", 2, "");
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_13", 4, "");
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_14", 5, "");
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_15", 2, "");
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_16", 3, "");
AddEnemyPatrolNode("enemy2_1_obj_wnodes", "PathNodeArea_17", 0, "");
SetSwingDoorOpen("carbinet_smash_obj", ture, true);
PlaySoundAtEntity("react_pant_snt", "enemy_hallucination_disappear.snt", 0, false);
AddTimer("Timer_3", 1, "Timer_LookAt_3");
AddTimer("Timer_3_2", 1, "Timer_LookAt_3");
}
void Timer_LookAt_3(string &in asTimer)
{
string x = asTimer;
if (x == "Timer_3")
{
StartPlayerLookAt("enemy1_1_obj_wnodes");
FadeIn(2);
GiveSanityBoostSmall();
}
else if(x == "Timer_3_2")
{
StopPlayerLookAt();
FadeOut(0);
}
}
void SCDoorSmashSCF_1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("door_hon_scarechamber_obj", true, true);
SetSwingDoorLocked("door_hon_scarechamber_obj", true, true);
PlaySoundAtEntity("guardboo", "guardian_distant1", "Player", 0, false);
PlaySoundAtEntity("thunderboo", "general_thunder.snt", "Player", 0, false);
}
void SCGoSlowerSCF_1(string &in asParent, string &in asChild, int alState)
{
SetPlayerSpeedMul(0.5f);
}
void SCSmashChestOpenSCF_1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorOpen("chest_smash_open_obj", true, true);
PlaySoundAtEntity("react_pant.snt", "04_scream.snt", "Player", 0, false);
}
void SCPortSCSCF_1(string &in asParent, string &in asChild, int alState)
{
TeleportPlayer("that_is_your_nightmare_scf");
FadeOut(10);
FadeIn(07);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
SetPlayerActive(false);
SetPlayerCrouching(true);
}
since i was take the timers in the script file, it could not load my map! That is a really big project that i was making and i don't want to give it up!
Please help
GReeZe' P44
|