Frictional Games Forum (read-only)
Fatal error could not load script file - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Fatal error could not load script file (/thread-21169.html)



Fatal error could not load script file - TheKaci1234 - 04-14-2013

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)


RE: Fatal error could not load script file - Romulator - 04-14-2013

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


RE: Fatal error could not load script file - The chaser - 04-14-2013

(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.


RE: Fatal error could not load script file - TheKaci1234 - 04-15-2013

thanks