PhotonRPC issue

Options
Hello guys,

i have this lovely problem i would like some help with

This is the RPC send call
[code2=csharp]public void newValues()
{
scene.RPC("SetValues", PhotonTargets.OthersBuffered,
biomes[0].minHeight,
biomes[0].maxHeight,
biomes[0].mountainPower,
biomes[0].mountainPowerBonus,
brickHeight,
seed);
}[/code2]

This is the actuall Call it is trying to call
[code2=csharp][RPC]
public void SetValues(int newMinHeight,
int newMaxHeight,
float newMountainPower,
float newMountainPowerBonus,
float newBrickheight,
int newSeed)
{
biomes[0].minHeight = newMinHeight;
biomes[0].maxHeight = newMaxHeight;
biomes[0].mountainPower = newMountainPower;
biomes[0].mountainPowerBonus = newMountainPowerBonus;
brickHeight = newBrickheight;
seed = newSeed;
}[/code2]

I get this error -
PhotonView with ID 11 has no method "SetValues" that takes 6 argument(s): Single, Single, Single, Single, Single, Int32
UnityEngine.Debug:LogError(Object)
NetworkingPeer:ExecuteRPC(Hashtable, PhotonPlayer) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:2009)
NetworkingPeer:OnEvent(EventData) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1643)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:76)

I have a PhotonView attached to the GameObject, Its giving me this problem, dont know where the problem is actually saying

Thanks in Advanced - TrippySmurf

Comments

  • It looks like biomes[0].minHeight and biomes[0].maxHeight are floats (single) but in the definition for SetValues you are expecting int for those parameters. The error for SetValues says the 6 arguments you passed in were Single, Single, Single, Single, Single, Int32. Single means float.
  • haha
    I feel like such an idiot, I guess that happens with late night programming
    Thanks so much