Posted 29 December 2012 - 08:15 AM
Possible to change variable and save it, example if i reboot my computer that variable is still in my program what was there last time.
hWrite = fs.open("fileName", "w") --Where filename is the name of the file in whitch you want to save the variable and w open the file in write mode.
hWrite.writeLine(variable) --variable is you variable to save
hWrite.close() --This is important, if you don't close the file it won't work
---------------------------------------------------------------
--To get your variable again you can do:
hRead = fs.open("fileName", "r") --"r" is read mode
variable = hRead.readLine() --It will return the variable (as a string)
hRead.close()