upload so it isnt lost now
This commit is contained in:
14
data/scripts/in_out.lua
Normal file
14
data/scripts/in_out.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
function doOutput(table)
|
||||
local file = io.open("map.json", "w")
|
||||
io.output(file)
|
||||
io.write(json.encode(table))
|
||||
io.close(file)
|
||||
end
|
||||
|
||||
function getInput(filename)
|
||||
local file = io.open(filename, "r")
|
||||
io.input(file)
|
||||
local content = io.read()
|
||||
io.close(file)
|
||||
return content
|
||||
end
|
||||
Reference in New Issue
Block a user