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

Edit Command in a program?

Started by BladeRavinger, 03 March 2014 - 04:28 PM
BladeRavinger #1
Posted 03 March 2014 - 05:28 PM
is it possible to use the edit command within a program, or any kind of file read/write?

i suck, intensely at this coding junk, i have spent the past 3 hours getting my wireless turtle to do what i want, now i have the base done i can program the rest instantly.

i am using individual programs to do all my junk and would like to output every step the turtle takes so have an exact count of how far she's gone then the return can step back the same distance and reset the value to 0.

i already have a few programs that have a return set, but i want 'Alfie' to be free roam, controlled from my hut instead if manually climbing down to move her.

if its not possible il just have to make a few presets.

thanks
Lyqyd #2
Posted 03 March 2014 - 05:32 PM
You can read and write from files using the fs or io APIs. More information and usage examples can be found on the wiki pages for those APIs. After you read up on those, feel free to ask any questions you have in this topic.
BladeRavinger #3
Posted 08 March 2014 - 11:45 AM
thank you, i have been searching for days. i was obviously not asking the right questions