Posted 12 October 2014 - 08:39 AM
Hello world :D/> hehe
i'm messing around the FS api..
and tbh.. i have no idea on how to get it to work..
im trying to save a variable from an IF statement, to a file for later use (if computer is rebooted, then it "knows" what the state of the IF was)
how would i get around that..
i have tried the
fs.open("filename","w")
fs.writeLine(*var name*)
fs.close()
as it was how i "thought" it was used.. but when i do that, it just prints 15, in my UI
tried putting the variables name infront of the FS aswell
*varname* = fs.open("filename","w")
and for the write and close aswell..
im asking here, since i couldnt locate a tutorial on the FS api on the forums :(/>
my code im testing on is very simple
i'm messing around the FS api..
and tbh.. i have no idea on how to get it to work..
im trying to save a variable from an IF statement, to a file for later use (if computer is rebooted, then it "knows" what the state of the IF was)
how would i get around that..
i have tried the
fs.open("filename","w")
fs.writeLine(*var name*)
fs.close()
as it was how i "thought" it was used.. but when i do that, it just prints 15, in my UI
tried putting the variables name infront of the FS aswell
*varname* = fs.open("filename","w")
and for the write and close aswell..
im asking here, since i couldnt locate a tutorial on the FS api on the forums :(/>
my code im testing on is very simple
mfrlaser = *open the FS file and read it to set the mfrlaser state*
while true do
input = read()
if input == "mfr" then
if mfrlaser == true then
mfrlaser = false
else
mfrlaser = true
end
end
end
*then the FS saving things comes here*