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) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with script
lanlord000 Offline
Junior Member

Posts: 3
Threads: 1
Joined: Aug 2011
Reputation: 0
#1
Need help with script

What is wrong with this script, when i start the map it gives me an error. The names a right and everyting else. Am noobish at scripting

////////////////////////////
// Run when entering map
void OnEnter()

{
AddUseItemCallback("", "roomkey_1", "mansion_1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("roomkey_1");
}

void OnLeave()

{
AddUseItemCallback("", "roomkey_2", "mansion_3", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
RemoveItem("roomkey_2");
}

void OnLeave()

{
(This post was last modified: 08-22-2011, 12:32 PM by lanlord000.)
08-21-2011, 01:41 AM
Find


Messages In This Thread
Need help with script - by lanlord000 - 08-21-2011, 01:41 AM
RE: Need help with script - by Tanshaydar - 08-21-2011, 01:50 AM
RE: Need help with script - by lanlord000 - 08-21-2011, 02:23 AM
RE: Need help with script - by Elven - 08-21-2011, 02:26 AM
RE: Need help with script - by Khan - 08-21-2011, 04:33 AM
RE: Need help with script - by lanlord000 - 08-21-2011, 12:25 PM
RE: Need help with script - by Khan - 08-21-2011, 12:53 PM



Users browsing this thread: 1 Guest(s)