OperationResponse + Array
Hi,
First I must say my english is not so good
. However, I absolutely need help, please.
So I will send an array from server to client, and processed there, but I get there only the value "null". I have given you something to Pastebin.com uploaded http://pastebin.com/TkVRFehu.
It would be nice if you can help!
With best regards from Germany
Salvus!
First I must say my english is not so good

So I will send an array from server to client, and processed there, but I get there only the value "null". I have given you something to Pastebin.com uploaded http://pastebin.com/TkVRFehu.
It would be nice if you can help!
With best regards from Germany
Salvus!
0
Comments
EDIT: you can find a list the available data types here: http://developer.exitgames.com/photoncl ... ryprotocol
Thank you:)
You are using: string[][] array = new string[500][];
Thats a 2-dimensional array of strings. I think in the current protocol this is not supported either. 1-dimensional ones are working fine.
It could be an awful lot of data to send, if you send 500 arrays of array with string in those. This is worth improving! Even if those are empty, they will be sent (empty). It looks like you send some positions. Integer is a better format for those.
Then: I don't "get" your code: Line 45 looks like a guaranteed bug, as it "randomly" re-sets one of the values.
You could use a int[] per "id" and use the id in the event's content as key (key = id, value = int[])...
the only thing I do wrong?
Which server and client version are you using (the platform-name and numbers in the SDK zip names)?
Photon (it's clear) x64bit to Windows 7. The version of the website is the Alktuelle: 2.6.7.525
for the client I used Unity3D the Current website.
In the client I have the following files: PhotonUnity3D
And for the server: ExitGamesLibs, Photon.SocketServer, photo host runtime interfaces
Mfg
I assume you cut the client-code which checks for the matching operation code just to make this copy short?? On the client side, you get more responses than just the 112, where you now add the gamer array. You have to switch with the opCode, client side. Only response to op 112 will contain your array. Any else fails with null-ref.
Please verify for me that you're matching the opcode on the client.
(I would have asked this before but didn't notice it before.)
Beschreibst du mir deinen letzten Post nochmal?
Ich habe schon etwas weitergetestet und schaf es einfach nicht mit den Arrays.
Kennen sie ein beispiel den beim CLienten kommt immer nur Null an, auch wenn ich Hashtable nutzte!
Mfg
Wenn du deine Operation aufrufst und das Ergebnis (mit demselben OpCode) bekommst, kannst du den Inhalt des Ergebnisses mal loggen. Die SupportClass hat eine HashtableToString(ht) Funktion dafür. Es würde mir helfen, wenn ich das Ergebnis kenne.
PS: morgen ist unsere Sommerfeier. Ich glaube bis DO wird das noch dauern.
An error in my implementation was, that I tried to get the string[] by: returnValues[101]. C# is a bit picky here: It sees by 101 as integer. The one in the returnValues is byte. It won't be equal! So use: returnValues[(byte)101] to get the content. Then it's working fine.
I used:
ExitGames-Photon-Server-SDK_v2-6-11-1647.zip
Photon-DotNet_v6-4-3_SDK.zip (which is about the same as Photon-Unity3D_v6-4-3_SDK.zip)
My code:
I hope this helps.