Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

Unable to call an RPC with two integer parameters

$
0
0
Hey there guys,

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)

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!

Viewing all articles
Browse latest Browse all 15755

Trending Articles