Posted 12 February 2013 - 12:41 PM
how do i save
door1 = open
so when it reboots it nows door1 equals open
door1 = open
so when it reboots it nows door1 equals open
local function saveVar(text)
f = fs.open("var", "w")
f.write(text)
f.close()
end
local function getVar(text)
f = fs.open("var", "r")
local data = f.readAll()
f.close()
return data
end
saveVar("true")
status = getVar()
print(status) --> true