Posted 02 November 2013 - 10:50 AM
As with most who post questions on here, I am piecing things together one issue at a time and my floor program is fully functioning except for the inventory. Upon running out of blocks, it cycles through the inventory infinitely. I want the turtle to scan for more blocks of the same type in all slots available (2-15) one time, if there is nothing useable, wait for user to input useable material and hit a key. It will then scan the inventory completely one time to find the placed in item and continue running, if not found, pester the user some more. I have had a good many variations of attempts at figuring this out, but am beyond confused at what needs to be done. A little guidance would be very helpful!
I removed any indication of waiting for user input, that is not my issue, mainly just the inventory cycling crazily.
local function checkInv()
turtle.getItemCount( inventory )
while turtle.getItemCount( inventory ) == 1 do
for slot = 2, 15 do
turtle.select ( slot )
if turtle.getItemCount( slot ) > 0 and turtle.compareTo( inventory ) == true then
turtle.transferTo( inventory )
turtle.select( inventory )
break
end
end
end
end
I removed any indication of waiting for user input, that is not my issue, mainly just the inventory cycling crazily.
Edited on 02 November 2013 - 10:09 AM