Unable to call an RPC with two integer parameters
Options
Hey there guys,
I'm having the issue stated in the title. The console is logging the error:
It works when I pass two strings, however it will not work if I pass two integers. Here is the code:
Thanks!
I'm having the issue stated in the title. The console is logging the error:
Operation failed: OperationResponse 225: ReturnCode: 32760 (No match found). Parameters: {}
UnityEngine.Debug:LogWarning(Object)
UnityEngine.Debug:LogWarning(Object)
It works when I pass two strings, however it will not work if I pass two integers. Here is the code:
public void SpawnToAvailablePoint(PhotonView horsePhotonView) { for (int i = 0; i < totalSpawnPoints; i++) { if (!spawnPoints[i].Occupied) { photonView.RPC("SetPointToOccupied", PhotonTargets.AllBuffered, i, horsePhotonView.viewID); return; } } Debug.LogWarning("NO MORE SPAWN POINTS!!!"); } [PunRPC] public void SetPointToOccupied(int index, int viewID) { PhotonView.Find(viewID).transform.position = spawnPoints[index].transform.position; spawnPoints[index].Occupied = true; }I'd love to know what the problem is. I'm stuck on this at work!
Thanks!
0
Comments
-
Hi @bazz_boyy,
I guess you usePhotonNetwork.JoinRandomRoom();
or something similar at least the console log states something like this. The warning has nothing to do with RPC calls, it tells you that there isn't any room available for joining.
You can for example usePhotonNetwork.JoinOrCreateRoom("Room", new RoomOptions(), null);
to join an existing room with the given name or create a new one if there is no room available.0