Skip to content

Instantly share code, notes, and snippets.

@PilzAdam
Last active December 11, 2015 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PilzAdam/4540471 to your computer and use it in GitHub Desktop.
Save PilzAdam/4540471 to your computer and use it in GitHub Desktop.
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