Hi,
I've noticed that the objects in the Tables I created are being auto-sorted according to its keys values.
For example, I have 3 tables that represents grids (map grids), and each object in the greed is represented as x,y (thats the key)
so instead of having it sorted the way it was created: [(0,0), (0,1), (0,2)...] i get it as [(0,0), (0,1), (0,11)...]
The reason I'm saving the keys this way, is in order to keep the key as unique as possible without need of more information to describe the object (and because it has a specific indices, i was thinking its the best way).
my problem is that the client side needs to draw a map according to the content of the objects, so it needs to get the objects content in a specific indices order, just like a 2 loops (one is an internal loop) that runs from 0 to n would generate.
lets say that the objects content represents a color (for example. 0 = yellow, 1 = green, 2 = red)
so if my table supposed to represents a NxN table, its impossible for me to build the grid map as I want as long as my object key is the indices.
Anyway, I hope i'm clear enough, if not excuse me.
I was wondering if anyone that had to do that before has an Idea to avoid this problem, or maybe to