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
Can someone tell me what is wrong with this script?
Magasztos Offline
Member

Posts: 54
Threads: 21
Joined: Jun 2012
Reputation: 0
#1
Can someone tell me what is wrong with this script?

void OnStart()

{

AddUseItemCallback("", "key1", "hatch1", "UsedKeyOnHatch", true);

AddUseItemCallback("", "key2", "prison_1", "DoorLocked", true);

AddUseItemCallback("", "key2", "prison_2", "DoorUnlocked", true);

AddEntityCollideCallback("hatch1", "ScriptArea_1", "CollideAreaLadder", true);

}



void UsedKeyOnHatch(string &in asItem, string &in asEntity)

{

SetEntityActive("block1", false);

SetSwingDoorLocked("hatch1", false, true);

RemoveItem("key1");

}



void DoorLocked(string &in asItem, string &in asEntity)

{

SetEntityActive("prison_1", false);

SetEntityActive("prison_2", true);

AddUseItemCallback("", "key2", "prison_1", "DoorLocked", true);

}



void DoorUnlocked(string &in asItem, string &in asEntity)

{

SetEntityActive("prison_1", true);

SetEntityActive("prison_2", false);

AddUseItemCallback("", "key2", "prison_2", "DoorUnlocked", true);

}



void CollideAreaLadder(string &in asParent, string &in asChild, int alState)

{

SetEntityActive("LadderArea_1", true);

}



void OnEnter()

{



}



void OnLeave()

{



}

The only thing I know is that there is a problem with the last callback/function because if I delete that it works just fine



I keep getting a message saying there are "no matching signatures" I know what this means but I just can't seem to find out what the problem is.

Thanks in advance

-Imre

~The Hulk is always greener on the other side~
(This post was last modified: 07-20-2012, 03:05 PM by Magasztos.)
07-12-2012, 03:34 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Can someone tell me what is wrong with this script?

Your AddEntityCollideCallback is missing an argument.

Tutorials: From Noob to Pro
07-12-2012, 04:41 PM
Website Find
Magasztos Offline
Member

Posts: 54
Threads: 21
Joined: Jun 2012
Reputation: 0
#3
RE: Can someone tell me what is wrong with this script?

(07-12-2012, 04:41 PM)Your Computer Wrote: Your AddEntityCollideCallback is missing an argument.


This might be really stupid as well...but ehhh...what is that?

~The Hulk is always greener on the other side~
07-12-2012, 05:07 PM
Find
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#4
RE: Can someone tell me what is wrong with this script?

He means that at the part you have:
AddEntityCollideCallback("hatch1", "ScriptArea_1", "CollideAreaLadder", true);

it should be somthing like this:
AddEntityCollideCallback("hatch1", "ScriptArea_1", "CollideAreaLadder", true, 1);

that means you missed an argument.
you're welcome

CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
(This post was last modified: 07-12-2012, 05:21 PM by Steve.)
07-12-2012, 05:21 PM
Find




Users browsing this thread: 1 Guest(s)