This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Th3RadMan's profile picture

Why Isn't My Code Doing What I Want It To Do?

Started by Th3RadMan, 06 September 2013 - 05:45 PM
Th3RadMan #1
Posted 06 September 2013 - 07:45 PM
I got this really simple piece of code but it isnt doing what i want it to do >.<

it gets items, then places above how many items are put in its inventory


while true do
  turtle.select(1)
  num = turtle.getItemCount(1)
    for i = 1, num do
  turtle.placeUp()
  end
end
Bubba #2
Posted 06 September 2013 - 08:23 PM
Okay… well what is it doing wrong?
Lyqyd #3
Posted 06 September 2013 - 08:24 PM
You can't place more than one block in the same location. Do you want it to move forward as well? You'll have to tell it to do that.
Th3RadMan #4
Posted 06 September 2013 - 09:11 PM
ok…lyqyd, you solved my problem in your question hahaha… it was doing a place command, not a drop command…its fixed