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 the file?
MaksoPL Offline
Member

Posts: 51
Threads: 26
Joined: Mar 2014
Reputation: 0
#1
Unexpected end of the file?

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");
}
02-14-2015, 08:14 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#2
RE: Unexpected end of the file?

AddUseItemCallback("","key1","door1","UseKeyOnDoor

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

AddUseItemCallback("","key1","door1","UseKeyOnDoor", true);

Derp.
02-14-2015, 08:28 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#3
RE: Unexpected end of the file?

PHP Code: (Select All)
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: (Select All)
void TouchDoor(string &in asEntity)
{
    if(
GetLocalVarInt("Switch") == 0)
    {
        
AddQuest("door""touchdoor");
    }


(This post was last modified: 02-14-2015, 08:29 PM by Mudbill.)
02-14-2015, 08:29 PM
Find
MaksoPL Offline
Member

Posts: 51
Threads: 26
Joined: Mar 2014
Reputation: 0
#4
RE: Unexpected end of the file?

Oh... Thank you Smile I'm Newbie in developing.
02-14-2015, 08:32 PM
Find




Users browsing this thread: 2 Guest(s)