I started using BigNum to represent large numbers, after having problems writing my own. Works nicely. Only trouble is, when I load my save game data that I previously saved, the numbers come back zero.
Well, the problem is that BigNum is zero-indexed internally (don't ask me why!!! I don't know why anyone would do this!!) This problem took me 3 days to identify, haha. So anyway apparently datastore.write isn't writing values in the 0 index of a table.
You can test this by running the following code:
arraytest = { [0] = "drink me" }
playdate.datastore.write(arraytest, "testing")
testing.json will contain the following:
{
}
but in the simulator, arraytest looks like:
If this is intended, that's fine - I will do the work converting bignum to 1-indexed. But it did seem like maybe this was a bug so I thought I'd post it just in case.