This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Zenon's profile picture

[UnNeeded]Saving Information Between Sessions

Started by Zenon, 19 July 2015 - 05:16 PM
Zenon #1
Posted 19 July 2015 - 07:16 PM
Hi all! Just wondering if anyone knew how to save variables between sessions, as I want to make my program remember what color, or username, etc. the user chose. Thanks in advance!

Edit: I google this more and finally found a solution using files, sorry for posting a thread that didnt need to be posted D:
Edited on 19 July 2015 - 05:55 PM
Dragon53535 #2
Posted 19 July 2015 - 07:54 PM
You have to save things into a file to be able to use them between sessions. That's how a normal computer does it as well. So if I were to make a game that saved your progress, that progress would be in a file somewhere. The only question though, is what way you decide to take it. I would use the FS API, probably using this Tutorial.
Zenon #3
Posted 19 July 2015 - 07:56 PM
You have to save things into a file to be able to use them between sessions. That's how a normal computer does it as well. So if I were to make a game that saved your progress, that progress would be in a file somewhere. The only question though, is what way you decide to take it. I would use the FS API, probably using this Tutorial.

Thanks for your reply, Ive used fs before, just didnt think of it at the time lol