Frictional Games Forum (read-only)

Full Version: Fatal error could not load script file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi im new in scripting i got an error:
FATAL ERROR: Could not load script file
'custom_stories/domek/maps/domek.hps'!
main (3, 19) : ERR : Expected ';'


My script file:
void OnEnter()
{
AddUseItemCallback{"", "kluczdodrzwi_1", "drzwi", "UsedKeyOnDoor", bool abAutoDestroy};
}

void MyFunc(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("drzwi", false, true);
PlaySoundAtEntity("", "unlock_door", "drzwi", 0, false);
RemoveItem("kluczdodrzwi_1");
}




I hope someone can help.
(Sorry for bad english im polish)
Code:
AddUseItemCallback{"", "kluczdodrzwi_1", "drzwi", "UsedKeyOnDoor", bool abAutoDestroy};

Change bool abAutoDestroy to either true or false.

True will mean that the key disappears from the player's inventory
False will mean that the key stays in the player's inventory Smile
(04-14-2013, 03:27 PM)TheKaci1234 Wrote: [ -> ]Hi im new in scripting i got an error:
FATAL ERROR: Could not load script file
'custom_stories/domek/maps/domek.hps'!
main (3, 19) : ERR : Expected ';'


My script file:
void OnEnter()
{
AddUseItemCallback("", "kluczdodrzwi_1", "drzwi", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("drzwi", false, true);
PlaySoundAtEntity("", "unlock_door", "drzwi", 0, false);
RemoveItem("kluczdodrzwi_1");
}




I hope someone can help.
(Sorry for bad english im polish)

Fixed.
thanks