28 posts
Location
Spain
Posted 13 March 2014 - 02:50 PM
How I can store internal data (That cannot be erased when I exit MC) on the turtle? (Like the fuel level)
Thanks
1281 posts
Posted 13 March 2014 - 02:59 PM
All data on the turtle can be erased obviously, unless you put it in the rom folder externally. Im guessing what you want is to store info that isn't lost when the turtle reboots. Why do you need to store the fuel level though? turtle.getFuelLevel() will always give you the current amount of fuel.
Anyways, to write files to the harddrive of a computer/turtle you'll need to use the fs api
http://computercraft.info/wiki/Fs_%28API%29Mainly fs.open, as this is used to create, write and read files depending on what arguments you give it.
http://computercraft.info/wiki/Fs.open
28 posts
Location
Spain
Posted 17 March 2014 - 01:35 PM
Ok, thanks
PD: The fuel level was an example
Edited on 17 March 2014 - 12:36 PM