Author Topic: Error: Failed to Call RFC... Failed to Convert Parameters  (Read 3552 times)

Acheron

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Error: Failed to Call RFC... Failed to Convert Parameters
« on: July 10, 2014, 02:58:41 PM »
Hi Aren.
I am getting numerous "Failed to Cal RFC" errors. Here is an example of what seems to be happening:
Script A has RFC #105, with the parameters Int, Byte, Byte, and Float.
Script B has an RFC #152 with the parameters float[], float[], float[].
Somehow, messages from script B with the RFC #152 are being sent to Script A and are being incorrectly applied to RFC #105.
As a result, the debug console is telling me it failed to convert the parameters.
These are completely different scripts, the GameObjects are different, and the RFC IDs are different. I do not know if the TNObject IDs are somehow the same between the objects. This is very unusual.
Any help in solving this problem would be appreciated.
Thank you.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Error: Failed to Call RFC... Failed to Convert Parameters
« Reply #1 on: July 10, 2014, 07:48:04 PM »
Did you change RFC IDs at some point? Find the "server.dat" file in your project folder and delete it. It may have saved older RFCs.

Acheron

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Error: Failed to Call RFC... Failed to Convert Parameters
« Reply #2 on: July 12, 2014, 10:23:29 PM »
No, I did not change the IDs at any point. This happens regardless of the server that I am using.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Error: Failed to Call RFC... Failed to Convert Parameters
« Reply #3 on: July 13, 2014, 05:07:46 PM »
The way TNet's addressing works is it takes the TNObject's ID (3 bytes) and merges it with the RFC ID (1 byte) to create a 4 byte (integer) identifier. So I see no way that RFC 105 would be sent to a function labelled as RFC 102, or vice versa. Something else is going on there.

Note that if you have instantiated nested TNObjects, only the topmost object's ID matters.

gg67

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 66
    • View Profile
Re: Error: Failed to Call RFC... Failed to Convert Parameters
« Reply #4 on: July 18, 2014, 07:31:12 AM »
If only the top TNObject's id matters, does TNet know which sub-tnobject game object to call the RFC on?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Error: Failed to Call RFC... Failed to Convert Parameters
« Reply #5 on: July 18, 2014, 07:52:35 AM »
No, the topmost TNObject will collect all the RFCs underneath it (line 410 of TNObject.cs), so the child TNObjects are effectively unnecessary.