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

Lua turtle help

Started by Boldy97, 13 August 2012 - 10:19 AM
Boldy97 #1
Posted 13 August 2012 - 12:19 PM
I'm making my own api for a quarry, since the other ones i've found are way too complicated to configure or they don't drop their stuff.

I know exactly how to make every part, even the part where the turtle drops its stuff and returns to its previous location, pointing in the same direction.
My only problem is: I need it to continue where it left off.

I've read this,
but if I could use label and goto it would be much easier since I could put a label in the part where it was (for example: moving forward) and a variable would be used to specify what the turtle was doing when it became full and had to drop.

My only option now is to make seperate functions for each step. Is there an easier way?


Best regards,
Boldy97


PS: I haven't started writing my code yet, only scribbled some things down on a piece of paper, so don't worry about it :P/>/>
Cranium #2
Posted 13 August 2012 - 03:07 PM
You could save the status to a file. I have worked (exhaustingly) with this lately, and it's actually pretty reliable. If you can save your status to a file after every change, you can just reload from the previous state.
Ponder #3
Posted 13 August 2012 - 09:57 PM
Function are the only reasonable solution. Actually I don't know a reason why would not want to use them.