Frictional Games Forum (read-only)

Full Version: Unexpected end of file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Guys Smile

Theres an error everytime i try to load my map, saying "Unexpected end of file" and stuff.
I looked everywhere in the .hps file to check if it should be it but i cant find anything wrong?

So could you guys maybe help me.

Screenshot
http://gyazo.com/7728439e69ebe9238478d68aab2a649a

.hps file

Quote: ////////////////////////
// Run when entering map
void OnEnter()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "MyFunc_1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "MyFunc_2", true, 1);
SetEntityPlayerLookAtCallback("Player", "Lookatfunc_1", true);
AddEntityCollideCallback("Player", "ScriptArea_3", "MyFunc_3", true, 1);
AddUseItemCallback("", "key_tomb_rusty_1", "block_box_1", "activatefunc_02", true);
AddEntityCollideCallback("Player", "ScriptArea_4", "MyFunc_4", true, 1);
}

void MyFunc_1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("Player", "explosion_rock_large.snt", "Player", 0, false);
SetMessage("Messages", "Message_4", 0);
}

void MyFunc_2(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("cellar_wood01_1", 0.0f);
PlaySoundAtEntity("Player", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("Player", "react_scare.snt", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}

void MyFunc_3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("armour_nice_complete_1", true);
SetEntityActive("armour_nice_complete_2", true);
SetEntityActive("armour_nice_complete_3", true);
SetEntityActive("torch_static_green_1", true);
SetEntityActive("torch_static_green_2", true);
PlaySoundAtEntity("Player", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("Player", "react_scare.snt", "Player", 0, false);
GiveSanityDamage(3.0f, true);
AddTimer("talktimer_1", 1, "talktimer_1");
}

void talktimer_1(string &in asTimer)
{
PlaySoundAtEntity("Player", "Halt.snt", "Player", 0, false);
}

void MyFunc_3(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
SetEntityActive("Infected_1", true);
StartPlayerLookAt("Infected_1" 15, 15, "");
ShowEnemyPlayerPosition("Infected_1");
PlaySoundAtEntity("Player", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("Player", "react_scare.snt", "Player", 0, false);
GiveSanityDamage(3.0f, true);
AddTimer("Infectedtimer_1", 4, "Infectedtimer_1");
}

void Infectedtimer_1(string &in asTimer)
{
StopPlayerLookAt();
SetPlayerActive(true);
}

void Lookatfunc_1(string &in asEntity, int alState)
{
PlaySoundAtEntity("Player", "24_iron_maiden.snt", "Player", 0, false);
PlaySoundAtEntity("Player", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("Player", "react_scare.snt", "Player", 0, false);
GiveSanityDamage(6.0f, true);
SetEntityActive("corpse_male_plague_fountain_1"", false);
}

void activatefunc_01(string &in asEntity, string &in type)
{
SetEntityActive("corpse_male_plague_fountain_1", true);
}

void activatefunc_02(string &in asItem, string &in asEntity)
{
SetEntityActive("armour_nice_complete_1", false);
SetEntityActive("armour_nice_complete_2", false);
SetEntityActive("armour_nice_complete_3", false);
SetEntityActive("block_box_1", false);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
You have double " at the end of your string in Lookatfunc_1:
Code:
SetEntityActive("corpse_male_plague_fountain_1"", false);
Try:
Code:
SetEntityActive("corpse_male_plague_fountain_1", false);
TY SO MUUUUUUUUUUUUUUUUUUUCH IT WORKED Smile
<3