Posted 11 April 2013 - 10:15 AM
I've tried everything I can, but it seems I can only write a hardcoded string to a file using fs.open().
The file it creates will simply say
Isn't it supposed to write the value of the variable to the file? I've tried adding quotation marks around the variable, and it neatly writes the string into the file. It's as if it doesn't see variables, which makes saving flexible variables so they will withstand a reboot is extremely hard, if not impossible.
Also, I've found various bits of information on the forums that say that you should be able to use variables when using fs.write().
t = fs.open("t","w")
t.write("Hello")
t.close
In this case, the string written to the file works perfectly fine.The file it creates will simply say
Hello
h = Hello
t = fs.open("t2","w")
t.write(h)
t.close
However, when I try this, the file it creates is empty.Isn't it supposed to write the value of the variable to the file? I've tried adding quotation marks around the variable, and it neatly writes the string into the file. It's as if it doesn't see variables, which makes saving flexible variables so they will withstand a reboot is extremely hard, if not impossible.
Also, I've found various bits of information on the forums that say that you should be able to use variables when using fs.write().