I did something dumb - RPC mismatch problem

I had this working then I had the server side RPC call a second function. Somewhere in those mods I changed something about the basic RPC call that throws an error on the client that says parameter 1 doesn’t match the declaration and it’s getting System.Monotype instead of UnityEngine.NetworkMessageInfo.

//client code
networkView.RPC("Authenticate",RPCMode.Server , userData , NetworkMessageInfo);

// declaration to keep Unity client Happy
@RPC
	function Authenticate(userData : String , info : NetworkMessageInfo) {
}

//Server code

@RPC
	function Authenticate(userData : String , info : NetworkMessageInfo) {
}

I have all the code inside the function commented out now (was thinking something in there was causing it).

Any ideas?

networkView.RPC("Authenticate",RPCMode.Server , userData);

Drop the NetworkMessageInfo.

Problem is that I need the info to match retrieved database info with the NetworkPlayer that is authenticating.

Well I tried just dropping the NetworkMessageInfo from the function call and it works fine. The idea of a function receiving a parameter that I didn’t pass to it is pretty strange to me. No wonder I couldn’t figure it out.

Thanks for the pointer!

RPC’s always pass networkmessageinfo automatically, you don’t have to pass it as a parameter, you only have to include it in the function declaration if you want to use it.

http://docs.unity3d.com/Documentation/Components/net-RPCDetails.html