56 posts
Posted 25 July 2013 - 08:10 AM
Making a simple furnace cooking program, and I am making it calculate the amount of coal needed by using math.ceil(fuelNeededUn) But the only problem is that when I try to suck, it suck all that is in the first slot of the chest, I only want it to collect the right amount, is there any way to do this, only using computercraft? I am in the newest version of computercraft the beta if you were wondering.
758 posts
Location
Budapest, Hungary
Posted 25 July 2013 - 08:14 AM
Suck out everything, then put back some with turtle.drop(). turtle.drop() accepts item count.
local fuelNeeded = 8 -- dunno
local slot = 16 -- an empty slot
turtle.select(slot)
turtle.suck()
turtle.drop(turtle.getItemCount(slot) - fuelNeeded)
56 posts
Posted 25 July 2013 - 08:17 AM
Suck out everything, then put back some with turtle.drop(). turtle.drop() accepts item count.
local fuelNeeded = 8 -- dunno
local slot = 16 -- an empty slot
turtle.select(slot)
turtle.suck()
turtle.drop(turtle.getItemCount(slot) - fuelNeeded)
This will have to do, Thanks a lot for the help. It's nice to have a community to help you out :D/>