Frictional Games Forum (read-only)

Full Version: .Hps File Failing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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 ()
{

}
Quote:void OnEnter ()

}

Should be:

PHP Code:
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.
Thank you so much! It fixed when I added it.