Hello!
I'm trying to send array data on a Multiplayer game. I understand the concept of arrays but I think I might be using "AsJSON" incorrectly.
I wanted to send array data across using "Send Message" on Multiplayer, I figured simply sending the string "Array.AsJSON" would work and then load it into the array on the other player, but this was not working, and the more I checked this, the more I got confused.
Here is a very simple c3p - Text, Array, Keyboard.
https://drive.google.com/open?id=17KF9b2uOerfpYxmvivbUkfamI5BsRD6e
Text is always set to "Array.AsJSON", and the array size is the default 10,1,1.
If you press SPACE it will attempt to set several array coordinates to "Hello", which I would have thought would display on the Text.
But then, nothing happens on the string. I tried "Set Array Size" to see if that would fix but it does not. All I see is: {"c2array":true,"size":,"data":],],],],],],],],],]]}
[Is the above array supposed to have nothing next to "size"?]
I can read values using "Array.At()" and it would return "Hello", so the array is storing data, but just not displaying "AsJSON" how I was expecting it to.
Am I using this incorrectly? Am I supposed to call the array.asjson in a different way? Or is this simply not how AsJSON can be used?
Many thanks!