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

Request: Allow null property values for expectedValues in Room.SetCustomProperties

$
0
0
Today I tried this:
Hashtable propertiesToSet = new Hashtable();
Hashtable expectedValues = new Hashtable();

propertiesToSet["ex"] = 5;
expectedValues["ex"] = null;
PhotonNetwork.room.SetCustomProperties(propertiesToSet, expectedValues);
The result I wanted/expected was that if the property "ex" had already been set then don't change it, otherwise change it to (int)5. Is there any reason why this behaviour shouldn't be supported?

The result I got was:
Operation failed: OperationResponse 252: ReturnCode: -2 (CAS update failed: there is no property='ex' on server). Parameters: {} Server: GameServer
UnityEngine.Debug:LogError(Object)
NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1151)
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:125)
Any comments / thoughts?

Thanks

Jules

Viewing all articles
Browse latest Browse all 15755

Latest Images

Trending Articles



Latest Images