I have an issue when loading a table that has negative indexes, they get screwed after load
local table = {board={}}
table.board[-1] = 1
table.board[0] = 2
table.board[1] = 3
print("table contents")
pprint(table)
local filename = sys.get_save_file("paragonredux", "game")
sys.save(filename, table)
local loadedTable = sys.load(filename)
print("table contents after load")
pprint(loadedTable)
the output is
DEBUG:SCRIPT:
{ --[[000000001626D8E0]]
board = { --[[000000001626D910]]
0 = 2,
1 = 3,
-1 = 1
}
}
DEBUG:SCRIPT: table contents after load
DEBUG:SCRIPT:
{ --[[000000001626DAB0]]
board = { --[[000000001626DAE0]]
0 = 2,
1 = 3,
4294967295 = 1
}
}