Frictional Games Forum (read-only)

Full Version: Can't find the problem in my script?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I made a script for a map, where simply there's a key and there's a door. Mix those together and you know what. Well, the problem is, my script isn't working. Amnesia crashes when I play the map and shows an Error message. I've tried looking it over multiple times and checking the script functions with: http://wiki.frictionalgames.com/hpl2/amn..._functions
but to no help.

Anyone that could help? Undecided

Script:
Spoiler below!
void OnStart()
{
AddUseItemCallback("", "key_1","door_1", "opendoor_1", true);
}

void opendoor_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "unlock_door", "door_1", 0, false);
RemoveItem("key_1");
CompleteQuest("lockeddoorquest_1", "LockedDoorQuest_1", 0);
}

void DoorLockedPlayer(string &in entity)
{
if(GetSwingDoorLocked("door_1") == true)
{
AddQuest("lockeddoorquest_1", "LockedDoorQuest_1", 0);
}
}

void OnEnter()
{
}

void OnLeave()
{
}

Am I supposed to change: (string &in asItem, string &in asEntity) with the key and door name or what?
CompleteQuest and AddQuest do not take in a third argument.
(02-01-2013, 10:48 PM)Your Computer Wrote: [ -> ]CompleteQuest and AddQuest do not take in a third argument.

Well, Now I feel very stupid... I read statyk's sticky post but couldn't find the incorrect part. Thanks again. Confused