The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Messages In This Thread
Can't find the problem in my script? - by Tiger - 02-01-2013, 10:31 PM



Users browsing this thread: 1 Guest(s)