Alright so i have to dumb this code down so you can see what i am doing. But basically i am trying to call an RPC on an Object From the Server, it works fine in one place but nor fine in another e.g.
Works here
function OnPlayerConnected(player: NetworkPlayer) {
Debug.Log("Player "+player.ToString()+" Connected!" );
var AI : ActorInstance = new ActorInstance();
AI.RNID = player;
Server.ServerNET.NetView.RPC ("SendMessageC", AI.RNID, Server.ServerNET.Mess.P_VerifyAccount,"This works?!");
Server.ServerNET.Actor_Instances.Add(AI);
}
However if i try to run the same command as a method from within ServerNET object it fails to send the RPC
e.g.
Running within ServerNET
AI = FindActorInstanceFromRNID(M.FromID);
NetView.RPC ("SendMessageC",AI.RNID, Mess.P_VerifyAccount,"P");
I have debug logs set up spitting out which player and networkview i am sending it to, both the above function and this function send from the same networkview as well as to the same exact player, but only the first one works. If i set the Target to ALL then my server gets the message on the instance of the object however the client still doesn’t recieve anything if i call it from within ServerNET , i am goin out of my mindz lol.