Frictional Games Forum (read-only)

Full Version: .HPS fatal error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Can anyone help fix this fatal error:
FATAL ERROR: Could not load script file
'custom_stories/Unknown_Awaking/custom_stories/Unknown_Awaking/maps/00_Unknwn.hps
main (29,2) : ERR: Unexpected end of file
Heres my HPS
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "bedroomkey_1", "mansion_1", "KeyOnDoor", true);
AddUseItemCallback("", "basementkey_1", "Cellar_1", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1, false, true);
playerSoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("bedroomkey_1)
SetSwingDoorLocked("cellar_1", false, true);
PlaySoundAtEntity("", "unlock_door", "cellar_1", 0, false);
RemoveItem("basementkey_1");
)
////////////////////////////
// Run when entering map
void OnEnter()
{

)
////////////////////////////
// Run when leaving map
void OnLeave()
{

}
RemoveItem("bedroomkey_1) needs ; at the end i think.
(04-24-2011, 09:40 AM)Lexander.R Wrote: [ -> ]RemoveItem("bedroomkey_1) needs ; at the end i think.

Done that same error
-----
(04-24-2011, 10:17 AM)Swistrobl Wrote: [ -> ]
Code:
void OnEnter()
{

)

This might be your problem. Make it

void OnEnter()
{

}

instead.

I fixed both of those when I was having another look at it but still the same error, I seriously don't know whats wrong with the script
FOUND IT, THE END OF KEYONDOOR IS A ), NOT A }
FOUND IT, THE END OF KEYONDOOR IS A ), NOT A }
(04-24-2011, 10:21 AM)laser50 Wrote: [ -> ]FOUND IT, THE END OF KEYONDOOR IS A ), NOT A }
FOUND IT, THE END OF KEYONDOOR IS A ), NOT A }

Same error
-----
(04-24-2011, 10:30 AM)Swistrobl Wrote: [ -> ]
Code:
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1, false, true);

"mansion_1" also seems to lack a quotation mark at its right side.

edit: and "bedroomkey_1 too.

Thanks its now working, thanks man and thank you everyone else who helped me no more errors, thank you and kudos to whatever project you intent to do
You had a correctly written script, but missed/messed up things like quotation marks, braces and a semicolon. Theses are small details that you should be able to figure out without posting a whole new thread. You will do these small errors all the time when you script.

Therefor I suggest you download Notepad++ and set the language to C++, that way you will never have to make a thread about these types of problems again!
Pages: 1 2