Frictional Games Forum (read-only)
[SCRIPT] FATAL ERROR..... Script - 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: [SCRIPT] FATAL ERROR..... Script (/thread-11327.html)



FATAL ERROR..... Script - Sigvash - 11-13-2011

Quote:FATAL ERROR: Could not load script file 'custom_stories/The Choice/custom_stories/TheChoice/maps/third.hps'!
main (12,14) : ERR : 'monsterdoorkey_1' is not declared
thats the error

this is the third.hps file

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

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("monsterdoor", false, true);
PlaySoundAtEntity("" , "unlock_door", "monsterdoor", 0, false);
RemoveItem(monsterdoorkey_1);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{

}
Can someone help me?
Im very new to this


RE: FATAL ERROR..... Script - Tanshaydar - 11-13-2011

RemoveItem(monsterdoorkey_1);
should be
RemoveItem("monsterdoorkey_1");



RE: FATAL ERROR..... Script - Your Computer - 11-13-2011

Was there a tutorial you followed? If so, could you lead me to it?