Frictional Games Forum (read-only)
I need help with a 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: I need help with a Script (/thread-10521.html)



I need help with a Script - priesta - 09-30-2011

hello there people.
As im new to scripting, especially in making levels in amnesia, i watched a lot of
tutorials. and i did take a look at the script functions wiki.

I want to do a totally simple thing. A key that opens a locked door.
I do everything like they do in their tutorials. EVERTHING
But i keep getting this error...
[Image: errorqd.jpg]

Here is my HPS file

////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "awesomekey_1", "door_1", "UsedKeyOnDoor", true);
}

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

////////////////////////////
// Run when entering map
void OnEnter()
{

}

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

}


and here is my extra_english.lang

<LANGUAGE>
<RESOURCES>
</RESOURCES>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Hier gehts rund, einer in de Pobbes,(br) (br) einer in the Mund!</Entry>
</CATEGORY>
<CATEGORY Name ="Inventory">
<Entry Name="ItemName_AwesomeKey">Lounge Schlüssel</Entry>
<Entry Name="ItemDesc_AwesomeKey">"Schlüssel zur Lounge"</Entry>
</CATEGORY>
</LANGUAGE>


Please help me guys, im going mad over this simple sh*t
regards, priesta



RE: I need help with a Script - Obliviator27 - 09-30-2011

Put quotation marks around awesomekey_1. Smile



RE: I need help with a Script - priesta - 09-30-2011

(09-30-2011, 09:42 AM)Obliviator27 Wrote: Put quotation marks around awesomekey_1. Smile
uhm... i have quotation marks there? Huh
or do you mean at remove awesomekey?


EDIT: that was the point.... thank you man. rep for you