Skip to content

Instantly share code, notes, and snippets.

@PilzAdam

PilzAdam/gist:4540471

Last active Dec 11, 2015
Embed
What would you like to do?
local function save(table, file)
local file = io:open(file, "w")
if file then
file:write(minetest.serialize(table))
file:close()
end
end
local function load(file)
local file = io:open(file, "r")
if file then
local table = minetest.deserialize(file:read("*all"))
if type(table) == "table" then
return table
end
end
return {}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment