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
"No matching signatures" scripting help
ThomJ Offline
Junior Member

Posts: 2
Threads: 2
Joined: Feb 2012
Reputation: 0
#1
"No matching signatures" scripting help

Hello

I am new to scripting and have been striving to understand the language in which these scripts are written. I understand the basics of how it works, but I am unable to pinpoint my errors. Here is the script for my Test story and the error associated whilst trying to load it:


////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "BSKey_1", "mansion_1", "UseKeyOnDoor", true);
AddEntityCollideCallback("Player", "BSRoom", "CollideBSRoom", true, 1);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddEntityCollideCallback("Player", "Lights", "SuddenLights", true, 1);
}

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

void CollideBSRoom(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_1", true, true);
SetSwingDoorLocked("mansion_1", true, true);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
}

void SuddenLights(string& asLightName, bool abVisible)
{
SetLightVisible("BoxLight_2", 0);
}

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

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

And this is the error along with it:

main(43,1):INFO:Compiling void SuddenLights(string&inout, bool)
main(45,4):ERR:No matching signatures to 'SetLightVisable(string@&, const uint)'
main(45,4):INFO:Candidates are:
main(45,4):INFO:void SetLightVisable(string&in, bool)

Not too sure what to think of this..Everything works except for the light script =/
02-14-2012, 09:21 AM
Find
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#2
RE: "No matching signatures" scripting help

SetLightVisible("BoxLight_2", 0); should be SetLightVisible("BoxLight_2", false); or SetLightVisible("BoxLight_2", true);
02-14-2012, 09:27 AM
Website Find
onv Offline
Member

Posts: 51
Threads: 12
Joined: Feb 2012
Reputation: 2
#3
RE: "No matching signatures" scripting help

(02-14-2012, 09:27 AM)jens Wrote: SetLightVisible("BoxLight_2", 0); should be SetLightVisible("BoxLight_2", false); or SetLightVisible("BoxLight_2", true);
Remplace SetLightVisible("BoxLight_2", 0); with SetLightVisible("BoxLight_2", false);

And the syntax of SuddenLights is wrong , should be SuddenLight(string &in asParent, string &in asChild, int alState)


02-14-2012, 10:48 AM
Find
ThomJ Offline
Junior Member

Posts: 2
Threads: 2
Joined: Feb 2012
Reputation: 0
#4
RE: "No matching signatures" scripting help

@
[b]jens[/b] Ok that's kinda what I suspected after more thought today.@
[b]onv[/b] As for the syntax, I found the script on the wiki and simply copy and pasted it editing only the function name. Is (string &in asParent, string &in asChild, int alState) a universal syntax for every function?
02-15-2012, 12:13 AM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#5
RE: "No matching signatures" scripting help

(02-15-2012, 12:13 AM)ThomJ Wrote: @
[b]jens[/b] Ok that's kinda what I suspected after more thought today.@
[b]onv[/b] As for the syntax, I found the script on the wiki and simply copy and pasted it editing only the function name. Is (string &in asParent, string &in asChild, int alState) a universal syntax for every function?
No. It's the syntax for AddEntityCollideCallback.

The proper syntax for callbacks are listed on the wiki.


02-15-2012, 01:18 AM
Find




Users browsing this thread: 1 Guest(s)