Frictional Games Forum (read-only)

Full Version: I need help with a Script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Put quotation marks around awesomekey_1. Smile
(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