Frictional Games Forum (read-only)

Full Version: Unexpected end of file error (SOLVED)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was making my custom story and so added a few more quests, then I get this error. Heres my .hps file. And before you say, yes, I tryed putting in the } in line 10 but that only caused more errors. HELP! Sad

My .hps file:

PHP Code:
void OnStart()
{
    
AddUseItemCallback("""key_intro""intro_door""UseKeyOnDoor"true);
    
SetInventoryDisabled(true);
    
SetPlayerActive(false);
    
GiveSanityDamage(100false);
    
FadeOut(0.1);
    
AddQuest("memento2""memento2");


void InteractPassage(string &in asEntity); 
{
    
int interactCount GetLocalVarInt("HitCount");

    
AddLocalVarInt("HitCount"1);
    
AddTimer(""0.5"DecreaseHitCount");

    if (
interactCount == 1)
    {
        
SetPropHealth("BreakableJar"0);
    }

    if (
GetTimerTimeLeft("limitsound") == 0)
    {
        
AddTimer("limitsound"0.5"");

        
PlayGuiSound("impact_glass.ogg"1);
        
PlayGuiSound("break_glass_bottle1"1);
    }
}

void VoiceDone ()
{
    
SetPlayerSanity(70); 
    
SetInventoryDisabled(false);
    
SetPlayerActive(true);
    
FadeIn(3);
    
AddEntityCollideCallback("Player""AreaMemento""EventQuest"true1);
    
AddEntityCollideCallback("Player""AreaMemento_2""AcidQuest"true1);
    
AddUseItemCallback("""acido1""organico1""Dissolve"true);
}

void Dissolve (string &in asItemstring &in asEntity)
{
    
SetPropActiveAndFade("organico1"false3);
    
PreloadSound("puzzle_acid.snt");
    
CompleteQuest("memento2""memento2");
}

void DecreaseHitCount(string &in asTimer)
{
    
AddLocalVarInt("HitCount", -1);
}

void UseKeyOnDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked("intro_door"falsetrue);
    
PlaySoundAtEntity("Unlock_door""unlock_door.snt""intro_door"0false);
    
RemoveItem("intro_key");
}

void PickUpLantern(string &in asEntitystring &in type)
{
    
AddQuest("lantern""pickuplantern");
}

void EventQuest(string &in asParentstring &in asChildint alState)
{
    
AddQuest("area""memento1");
}

void OnEnter()
{
    
PlayMusic("04_amb.ogg"true1151true);
}

void OnLeave()
{
    
StopMusic(21);
    
CompleteQuest("lantern""pickuplantern");

Your OnStart() does not have a closing brace. ( } )

Put one after this line:
PHP Code:
AddQuest("memento2""memento2"); 

So it becomes:
PHP Code:
AddQuest("memento2""memento2"); 



If there are more errors after this, let me know what the actual message of the error is Smile
I got an error, "14,1 unexpected token {
Code:
void InteractPassage(string &in asEntity);

This has an ; that should be there. Delete it and it should be fine.
Thank you so much, it works now! Smile

https://www.youtube.com/watch?v=qGITFJr_4Po