Posted 28 December 2013 - 04:43 PM
Hello all programmers,
I have a little problem with my program, it's basically a wheat field farm kinda deal and the part where it change slot when the current one is empty is broken.
I know this program isn't pro at al but it's for my solo map and making clean programs isn't in my priority list.
When my little buddy runs he won't change slot when the first one is empty.
Thanks to all who helps people out in this forum, very appreciated !:)/>
I have a little problem with my program, it's basically a wheat field farm kinda deal and the part where it change slot when the current one is empty is broken.
I know this program isn't pro at al but it's for my solo map and making clean programs isn't in my priority list.
When my little buddy runs he won't change slot when the first one is empty.
rednet.open("right")
function open()
rednet.send(13,"open")
end
function close()
rednet.send(13,"close")
end
function rowRight()
for i=1,6 do
turtle.placeDown()
turtle.forward()
turtle.placeDown()
end
turtle.turnRight()
turtle.forward()
turtle.turnRight()
end
function rowLeft()
for i=1,6 do
turtle.placeDown()
turtle.forward()
turtle.placeDown()
end
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
end
function rowEnd()
for i=1,6 do
turtle.placeDown()
turtle.forward()
turtle.placeDown()
end
turtle.turnLeft()
for i=1,4 do
turtle.forward()
end
turtle.turnRight()
turtle.up()
turtle.forward()
end
function floor()
rowRight()
rowLeft()
rowRight()
rowLeft()
rowEnd()
end
function floorDown()
turtle.forward()
turtle.down()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
end
function floorLast()
rowRight()
rowLeft()
rowRight()
rowLeft()
for i=1,6 do
turtle.placeDown()
turtle.forward()
turtle.placeDown()
end
end
function cycle()
floor()
floor()
floor()
floor()
floorLast()
floorDown()
floorDown()
floorDown()
floorDown()
end
floor()
itemCount = turtle.getItemCount(slotNum)
if itemCount == 0 then
slotNum = slotNum + 1
turtle.select(slotNum)
end
Thanks to all who helps people out in this forum, very appreciated !:)/>