Last active
December 11, 2015 03:48
-
-
Save PilzAdam/4540471 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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