Frictional Games Forum (read-only)
Amnesia Editor error Item Not Declared - 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: Amnesia Editor error Item Not Declared (/thread-18541.html)



Amnesia Editor error Item Not Declared - ironman0001 - 09-28-2012

I'm trying to make a key to the door D: Here is the script and lang



void OnStart()
{
AddEntityCollideCallback("Player", "TeleportScript", "PoopedYaPants", true, 1);
SetMessage("Messages", "Popup1", 0);
AddUseItemCallback("", "Spooky", "Scared", "PopupHead", true);
}

void PoopedYaPants(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Jesus", true);
AddPropForce("Jesus", 0, 0, 10000, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "Jesus", 0, false);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
}

void Popup1()
{
AddEntityCollideCallback("Player", "Message_1", "Message1", true, 1);
}

void PopupHead(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Scared", false, true);
PlaySoundAtEntity("", "unlock_door", "Scared", 0, false);
RemoveItem(Spooky);
}



<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">You are inside of a house that is being controlled by an unknown person. You are locked inside until you find out who.</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">


</CATEGORY>
<CATEGORY Name="Messages">
<Entry Name="Popup1">Where am i? How did i get here? I should go downstairs to see if anyone else is here!</Entry>
</CATEGORY>
<CATEGORY Name="Descriptions">
<Entry Name="Popup2">Damn! It's locked! There's gotta be a key somewhere around here!</Entry>

</CATEGORY>
<CATEGORY Name="Levels">


</CATEGORY> Name ="Inventory">
<CATEGORY Name="Inventory">
<Entry Name="ItemDesc_Spooky">.</Entry>
<Entry Name="ItemName_Spooky">Living room key</Entry>
</CATEGORY>
</LANGUAGE>



RE: Amnesia Editor error Item Not Declared - Robby - 09-28-2012

RemoveItem("Spooky");


You forgot the quotes.


RE: Amnesia Editor error Item Not Declared - Steve - 09-28-2012

found something
RemoveItem(Spooky);
must be:
RemoveItem("Spooky");


RE: Amnesia Editor error Item Not Declared - KingWolf - 09-28-2012

Ninja'd.


RE: Amnesia Editor error Item Not Declared - FlawlessHappiness - 09-28-2012

declaration means a quoted text Wink