Posted 05 January 2013 - 07:49 AM
I made a turtle program to make a platform levels for my "factory" in Feed-The-Beast. Every time it runs out of blocks in a slot, I wanted it to switch to the next slot, but it only switches from the first slot to the second slot. How can I fix this?
--[[ VARIABLES ]]--
--[[ FUNCTIONS ]]--
function woodSlot()
a = 1
local b = turtle.getItemCount(a)
if b == 0 then
a = a+1
turtle.select(a)
end
end
--[[ MAIN CODE ]]--
while true do
if turtle.back() == true then
turtle.place()
elseif turtle.back() == false then
turtle.turnRight()
end
woodSlot()
end