Help with basic Photon Custom Operation tutorial
Options
Hi. im working of the PDF supplied in the doc folder..
on my client i have:
then in the server Peer OnOperationRequest:
which results in the following casting error:
advice/thoughts please.
on my client i have:
this.Peer.OpCustom(1, new Hashtable { { 100, "Hello World" } }, true);
then in the server Peer OnOperationRequest:
var response = new OperationResponse(request, 0, "OK", new Dictionary<short,object> { { 100, "Hello yourself!" } } ); this.PhotonPeer.SendOperationResponse(response);
which results in the following casting error:
InvalidCastException: Cannot cast from source type to destination type.
ExitGames.Client.Protocol.serializeParameters (System.Collections.Hashtable _parameters, Boolean useDummy, Byte opCode, Int16 invocID, System.Byte[] header) [0x00000]
advice/thoughts please.
0
Comments
-
vinnie@vivace.co.nz wrote:
this.Peer.OpCustom(1, new Hashtable { { 100, "Hello World" } }, true);
fixed:this.Peer.OpCustom(1, new Hashtable { { (byte)100, "Hello World" } }, true);
EDIT: obviously a bug in the pdf.. sorry for that0 -
doh.. i KNEW it was something pretty obvious.. thanks for spelling it out!0