angellus, on 01 June 2013 - 01:29 PM, said:
function path() while not turtle.detectDown() do local slot = 2 -- starting slot turtle.select(slot) while not turtle.placeDown() do -- loop through until success slot = slot + 1 if slot > 16 then term.write("Enter more materials. and press ENTER") -- out of stuff D: read() slot = 2 end turtle.select(slot) end end end local refuelSlot = 1 turtle.select(refuelSlot) turtle.refuel()
Edit: and the refuel i was wondering how to set a variable for how many coal it consumes each time not which slot it uses.
Edit:
using a lua editor to edit this in. when debug gets Syntax: then expected near '&'.why?