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:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Crowbar unlocks a closet, doesen't work.
MaZiCUT Offline
Senior Member

Posts: 536
Threads: 31
Joined: Jun 2012
Reputation: 17
#1
Crowbar unlocks a closet, doesen't work.

So i'm trying to make a Crowbar to unlock a closet, i don't want any crowbar to show up or so, i just want the closet to unlock when i use the crowbar on it. But i get this goddamn fatal error even though i do every goddamn thing correctly Huh

.lang



This could come handy.
Crowbar


.hps


void OnStart()
{
AddUseItemCallback("", "CrowbarForCabinet", "cabinet", "OpenCabinetDoor", true);

}


void OpenCabinetDoor(string &in item, string &in door)
{
SetSwingDoorLocked(cabinet, false, true);
PlaySoundAtEntity("", "unlock_door", cabinet, 0, false);
RemoveItem(CrowbarForCabinet);
}


void CeilingDoorLocked(string &in entity)
{
if(GetSwingDoorLocked("CeilingDoor") == true)
{
SetMessage("Messages", "PopupCeilingDoor", 0);
}
}



i get no errors and the map works when the script is like this:


.hpl




void OnStart()
{
AddUseItemCallback("", "CrowbarForCabinet", "cabinet", "OpenCabinetDoor", true);

}


void OpenCabinetDoor(string &in item, string &in door)
{
SetSwingDoorLocked(door, false, true);
PlaySoundAtEntity("", "unlock_door", cabinet, 0, false);
RemoveItem(item);
}


void CeilingDoorLocked(string &in entity)
{
if(GetSwingDoorLocked("CeilingDoor") == true)
{
SetMessage("Messages", "PopupCeilingDoor", 0);
}
}







fatal error:

[Image: 99p7q9.jpg]

Hi.
(This post was last modified: 06-22-2012, 11:03 PM by MaZiCUT.)
06-18-2012, 11:38 AM
Website Find


Messages In This Thread
Crowbar unlocks a closet, doesen't work. - by MaZiCUT - 06-18-2012, 11:38 AM



Users browsing this thread: 2 Guest(s)