Frictional Games Forum (read-only)

Full Version: Unexpected end of the file?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi. I've used somes scripts in .hps file, and
main 34,1 Unexpected end of the file.
This is my .hps file. What i've must do?

void OnStart()

{
AddEntityCollideCallback("Player","scared01","Barrel",true,1);
AddEntityCollideCallback("Player","thunderscript01","Burza",false,1);
AddUseItemCallback("","key1","door1","UseKeyOnDoor
}

void Barrel(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("barrel_script01",true);
}

void Burza(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("123","general_wind_whirl.snt","thunderscript01",0,false);
}

void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
SetLocalVarInt("Switch", 1);
CompleteQuest("door", "touchdoor");
}

void TouchDoor(string &in asEntity)
{
if(GetLocalVarInt("Switch") == 0)
}
{
AddQuest("door", "touchdoor");
}
AddUseItemCallback("","key1","door1","UseKeyOnDoor

This is not even finished. It's meant to look like this:

AddUseItemCallback("","key1","door1","UseKeyOnDoor", true);
PHP Code:
void TouchDoor(string &in asEntity)
{
if(
GetLocalVarInt("Switch") == 0)
}
{
AddQuest("door""touchdoor");


This is another problem. It doesn't use the rules of the syntax.

This is probably how you want it to be:

PHP Code:
void TouchDoor(string &in asEntity)
{
    if(
GetLocalVarInt("Switch") == 0)
    {
        
AddQuest("door""touchdoor");
    }

Oh... Thank you Smile I'm Newbie in developing.