Author Topic: "Parameters do not match signature"  (Read 2550 times)

djray2k

  • Jr. Member
  • **
  • Thank You
  • -Given: 4
  • -Receive: 4
  • Posts: 74
  • Blockey Hockey!
    • View Profile
    • Walking Talking Grilling Bear Studios
"Parameters do not match signature"
« on: August 11, 2013, 06:36:30 PM »
Trying to move an object around by sending the position and velocity.

I keep getting an exception thrown saying that the parameters do not match the signature.

Quote
parameters do not match signature
GamePlayer.OnSetPosVel (UnityEngine.Vector3)

My guess is that it has something to do with the exception saying that there is only one Vector3 when there should be two. No matter what I do, it doesn't seem to refresh the function.

How can I fix this?

Here's the code I use to send the data:
  1. public void setPositionVelocity()
  2. {
  3.      Vector3 vel = velocity;
  4.      Vector3 pos = transform.position;
  5.      tno.SendQuickly(12, Target.AllSaved, pos, vel);
  6. }
  7.  

Here's the code I use to set the data:
  1. [RFC(12)]
  2. void OnSetPosVel(Vector3 oPos, Vector3 oVel)
  3. {
  4.      transform.position = oPos;
  5.      velocity = oVel;
  6. }
  7.  

pyscho2day

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 74
    • View Profile
Re: "Parameters do not match signature"
« Reply #1 on: August 12, 2013, 11:01:26 AM »
Make sure you don't have a second RFC(12) on the same object.  Each RFC has to be unique on an object even if in a different script.

djray2k

  • Jr. Member
  • **
  • Thank You
  • -Given: 4
  • -Receive: 4
  • Posts: 74
  • Blockey Hockey!
    • View Profile
    • Walking Talking Grilling Bear Studios
Re: "Parameters do not match signature"
« Reply #2 on: August 12, 2013, 04:19:18 PM »
That wasn't the problem, but it lead me to the answer. I was calling 12 in another function by mistake. Thanks.