I'm using VS Code to build a project for Playdate.
I'm having issues using datastore properly. I'm able to write to "sav" using datastore.write, but what I need to do next is draw data from that .json file. Inside Playdate says that playdate.datastore.read returns a table. However, I haven't had any luck seeing the data after trying to use datastore.read.
I've tried what I thought would work, such as:
local someTable = playdate.datastore.read("sav")
Yet when I test the table to see what is in it (using printTable(someTable)), I get an empty table.
-- set table
sav = {x=10, y=20, label="something"}
-- write save data
playdate.datastore.write(sav, "file")
-- clear table
sav = {}
-- load save data
sav = playdate.datastore.read("file")
-- print loaded data
printTable(sav)