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
Silly scripting
GoDl1Kelol Offline
Member

Posts: 51
Threads: 7
Joined: Sep 2010
Reputation: 0
#1
Sad  Silly scripting

Okay, I've been trying to get a key to open a door for a century, here's my script


void OnStart()
{
AddUseItemCallback("", "keyfordoor", "mansion_2", "UsedKeyOnDoor", true);
SetEntityCallbackFunc("keyfordoor", "OnPickup");
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_2", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_2", 0, false);
RemoveItem("keyfordoor");
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("monster", true);
ShowEnemyPlayerPosition("monster");
}

I entered it many times and it didn't work and now all of a sudden it shows up with an error 12:13 ERR: keyfordoor not declared
I could really use some help for this
08-19-2011, 04:38 PM
Find


Messages In This Thread
Silly scripting - by GoDl1Kelol - 08-19-2011, 04:38 PM
RE: Silly scripting - by Rapture - 08-19-2011, 06:08 PM
RE: Silly scripting - by GoDl1Kelol - 08-19-2011, 07:24 PM



Users browsing this thread: 1 Guest(s)