Can't send RPC function because the target is not connected to the server

Hi, I’m calling a RPC function on a game object called Player and only want it to show on that player from another game object with -

playersNetworkView.RPC("ammoAddedGUIText", playersNetworkView.networkView.owner, "ammo added");

And on the game object Player it’s received with -

@RPC
function ammoAddedGUIText(Message : String){

	SpawnTxt(Message, 0.5, 0.5);
}

My problem is when there are 2 of us in the game it works as I expected it to only showing on the screen of the player picking up the ammo crate, but I get the error in the console “Can’t send RPC function because the target is not connected to the server.” even though in the game it seems to be working correctly … But if I just start a game on my own and pick an ammo crate up it give the error in the console and it does not show the message on screen, only if there is more than one player … anyone tell me what wrong please.

I have problem with “Can’t send RPC function because the target is not connected to the server” when I start game alone. So I fix it by calling RPC like this:

if (on.owner != networkView.owner) {
networkView.RPC (“DMG_message”, on.owner, hit.point, 5, on.name, on.owner); } else {
DMG_message (hit.point, 5, on.name, on.owner);
}

where
on.owner is NetworkPlayer of target

It means when you are alone and you are the one, who have to recieve this RPC message, you can call it directly without networking. I hope this will help

You are sending the RPC to yourself and you can’t do that in unity.