Frictional Games Forum (read-only)

Full Version: Unexpected end of file [PROBLEM]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Okay. So i made a test map with the level editor.
And when i try to load it, an error pop up and says:
FATAL ERROR: Could not load script file 'custom_stories/test/maps/testmap01.hps'!
Main (12,1) :ERR :Unexpected end of file

I don't know what to do.
Heres my .hps file:


Quote:void OnEnter()
{
AddUseItemCallback("", "keytodesk", "desk", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity}
{
SetSwingDoorLocked("desk", false, true);
PlaySoundAtEntity("", "unlock_door", "desk", 0, false);
RemoveItem("keytodesk");
}
Code:
void OnEnter()
{
AddUseItemCallback("", "keytodesk", "desk", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("desk", false, true);
PlaySoundAtEntity("", "unlock_door", "desk", 0, false);
RemoveItem("keytodesk");
}
The above code should be fixed now Smile.
You had placed a closing brace "}" on the end of "UsedKeyOnDoor(string &in asItem, string &in asEntity}" instead of a closing bracket ")" which was causing your error.
Oh my god Big Grin
I'm an idiot. Thank you!!!