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 .Hps File Failing
Caleb4eva Offline
Junior Member

Posts: 2
Threads: 1
Joined: Jun 2015
Reputation: 0
#1
.Hps File Failing

So I have been working on a custom story for a bit now and I have gotten to the point where I needed to have a key unlock a level door,After using the .Hps file and typing in the code for it to work when ever I try to load the custom story map in game I recieve a failure notice that says this:FATAL ERROR:Could not load script file customstories/The Garden/maps/The Garden.hps'!
main (14,1) :ERR :Expected ',' or ';'. Here is the hps file code:void OnStart()
{
AddUseItemCallback("", "Room Key_1", "mansiondoor_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("mansiondoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "Room key_1", 0, false);
RemoveItem("Room Key_1");
}
void OnEnter ()

}

void OnLeave ()
{

}
06-10-2015, 10:43 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#2
RE: .Hps File Failing

Quote:void OnEnter ()

}

Should be:

PHP Code: (Select All)
void OnEnter ()
{


You have missed 1 bracket -> {

-----
HINT:
main (14,1) = meaning LINE 14 has got an error and 1 = first letter or ANY first thing you miss or added.

Not sure what you have for making scripts..
I guess, almost all of us is using NotePad++
Free to download and it can show you the errors (if you have the right plugin enabled) and lines are more easy to see.
(This post was last modified: 06-10-2015, 10:59 PM by DnALANGE.)
06-10-2015, 10:53 PM
Find
Caleb4eva Offline
Junior Member

Posts: 2
Threads: 1
Joined: Jun 2015
Reputation: 0
#3
RE: .Hps File Failing

Thank you so much! It fixed when I added it.
06-11-2015, 01:51 AM
Find




Users browsing this thread: 1 Guest(s)