Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't find the problem in my script?
Tiger Away
Posting Freak

Posts: 1,874
Threads: 16
Joined: Nov 2012
Reputation: 55
#1
Can't find the problem in my script?

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?
(This post was last modified: 02-01-2013, 11:05 PM by Tiger.)
02-01-2013, 10:31 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Can't find the problem in my script?

CompleteQuest and AddQuest do not take in a third argument.

Tutorials: From Noob to Pro
02-01-2013, 10:48 PM
Website Find
Tiger Away
Posting Freak

Posts: 1,874
Threads: 16
Joined: Nov 2012
Reputation: 55
#3
RE: Can't find the problem in my script?

(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
02-01-2013, 10:53 PM
Find




Users browsing this thread: 2 Guest(s)