Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Unexpected end of file error (SOLVED)
A.M Team Offline
Banned

Posts: 811
Threads: 63
Joined: Sep 2014
#1
Bug  Unexpected end of file error (SOLVED)

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: (Select All)
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");

(This post was last modified: 09-11-2014, 06:25 PM by A.M Team.)
09-07-2014, 01:27 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: Unexpected end of file error

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

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

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



If there are more errors after this, let me know what the actual message of the error is Smile

Discord: Romulator#0001
[Image: 3f6f01a904.png]
09-07-2014, 01:47 PM
Find
A.M Team Offline
Banned

Posts: 811
Threads: 63
Joined: Sep 2014
#3
RE: Unexpected end of file error

I got an error, "14,1 unexpected token {
09-07-2014, 02:03 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#4
RE: Unexpected end of file error

void InteractPassage(string &in asEntity);

This has an ; that should be there. Delete it and it should be fine.

Derp.
(This post was last modified: 09-07-2014, 03:08 PM by Neelke.)
09-07-2014, 03:08 PM
Find
A.M Team Offline
Banned

Posts: 811
Threads: 63
Joined: Sep 2014
#5
RE: Unexpected end of file error

Thank you so much, it works now! Smile

https://www.youtube.com/watch?v=qGITFJr_4Po
09-07-2014, 03:22 PM
Find




Users browsing this thread: 2 Guest(s)