This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
PixelFox's profile picture

Output

Started by PixelFox, 08 February 2016 - 09:26 PM
PixelFox #1
Posted 08 February 2016 - 10:26 PM
I'm currently working on a tileset creator with CCLights2, and I'm attempting to write the output to a file, like:
{
{255, 0, 0}, {141, 250, 153}, {193, 144, 0},
{0, 0, 0}, {144, 144, 0}, {193, 153, 142}, …
}

The Y axis is each line
And the X axis is each position on the Y.
ex. {193, 153, 142}: y=2, x=3

But instead it's outputting

{
[1] = {
[1] = {255, 0, 0},
[2] = {141, 250, 153},
[3] = {193, 144, 0},
}
[2] = ….
}

Is there a way I could write it to a file in the way I intended?
Lyqyd #2
Posted 08 February 2016 - 10:40 PM
Sure. Use an updated copy of CC, back port the updated serialize function, or write your own serializer.
PixelFox #3
Posted 08 February 2016 - 10:40 PM
Ah! Thank you :)/>