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
What causes this error ???
FinBanana Offline
Junior Member

Posts: 29
Threads: 4
Joined: Jan 2012
Reputation: 0
#1
What causes this error ???

So, either I suck so bad at scripting that I can't even make AddUseItemCallBack commands or just some little thing that's wrong.
I keep getting the error message saying:
main (1,1) : INFO : Compiling void OnStart()
main (3,1) : ERR : No matching signatures to 'AddUseItemCallBack(string@&, string@&, string@&, string@&, const bool)'.

This is my script so you could possibly spot the problem.

PHP Code: (Select All)
void OnStart()
{
AddUseItemCallBack("""key_study_1""castle_7""UsedKeyOnDoor2"true);
AddUseItemCallback("""KeyOH""castle_4""UsedKeyOnDoor1"true);
AddEntityCollideCallback("Player""ScriptArea_1""Scare1"true1);
}
void UsedKeyOnDoor1(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked("castle_4"falsetrue);
    
SetSwingDoorLocked("castle_6"falsetrue);
    
PlaySoundAtEntity("""unlock_door""castle_4"0false);
    
RemoveItem("KeyOH");
}

void UsedKeyOnDoor2(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked("castle_7"falsetrue);
    
PlaySoundAtEntity("""unlock_door""castle_7"0false);
    
RemoveItem("Key_class_1");
}
void Scare1(string &in asParentstring &in asChildint alState)
{
    
StartPlayerLookAt("cabinet_nice1"2.0f2.0f"StopLookAtCabinet");
    
GiveSanityDamage(5.0ftrue);
    
SetEntityActive("corpse_male_1"true);
    
AddPropImpulse("corpse_male_1", -2000"world");
}

void StopLookAtCabinet()
{
    
StopPlayerLookAt();


It worked fine until I added the other 'AddUseItemCallBack' command. It's the first one on the script.
AddUseItemCallBack("", "key_study_1", "castle_7", "UsedKeyOnDoor2", true);
(This post was last modified: 01-30-2012, 06:33 PM by FinBanana.)
01-30-2012, 06:03 PM
Find


Messages In This Thread
What causes this error ??? - by FinBanana - 01-30-2012, 06:03 PM
RE: What causes this error ??? - by flamez3 - 01-30-2012, 06:12 PM
RE: What causes this error ??? - by FinBanana - 01-30-2012, 06:32 PM



Users browsing this thread: 1 Guest(s)