Frictional Games Forum (read-only)
Fatal error problems - 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 problems (/thread-10195.html)



Fatal error problems - Zlynan - 09-06-2011

Hello, when i'm tring to start my own custom story i made with HPL editor it says:

FATAR ERROR: Could not load script file 'custom_stories/First map/maps/Firstmaps.hps'!
main (12,16) : ERR : 'monsterdoorkey_1' is not declared.

And this is my script:

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "monsterdoorkey_1", "doorone", "UsedKeyOnDoor", true);
}

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

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

}

Please help me!


RE: Fatal error problems - Tanshaydar - 09-06-2011

When you are writing the name of the object, item or monster, you need to put " around the word.
RemoveItem(monsterdoorkey_1); is wrong
RemoveItem("monsterdoorkey_1"); is true.