Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2D array is empty when received. #128

Open
midn1 opened this issue Feb 12, 2017 · 2 comments
Open

2D array is empty when received. #128

midn1 opened this issue Feb 12, 2017 · 2 comments

Comments

@midn1
Copy link

midn1 commented Feb 12, 2017

I have this packet:

public class PacketHereIsAChunk {
	public int x;
	public int[][] blocks = new int[Chunk.SIZE_X][Chunk.SIZE_Y];
}

The 2D array is populated before sending. However when the client receives it. All ints become default values (0).

@RobertZenz
Copy link

I have quite the same thing, but for me it works. Odd, what version are you using? Do you have your own serializer for arrays? Do you utilize multi-threading (you fill the chunk in one thread and then send it using another)?

@midn1
Copy link
Author

midn1 commented Feb 12, 2017

I have version 2.22 and I fill the array in the same thread as the one I send it in.
And no, I do not have a serializer for arrays. Doesn't Kryonet have that builtin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants