Skip to content

Ludobits 6.9.0

Compare
Choose a tag to compare
@britzl britzl released this 09 Nov 10:17
· 19 commits to master since this release

NEW: ludobits.m.savetable has new functionality to save and load using both sys.* and io.* (w. json encoding)

-- load file using sys.load() (or create file if it doesn't exist)
local data = savetable.load(filename, "sys") -- or "io" for use of io.open and io.read

-- update table value
data.foo = "bar"

-- save table using sys.save()
savetable.save(data)

And:

local data = { foo = "bar" }

savetable.save(data, filename, "io") -- or "sys" for use of sys.save