Jump to content




Inventory Clear

turtle

  • You cannot reply to this topic
7 replies to this topic

#1 Trot

  • Members
  • 9 posts

Posted 30 December 2012 - 07:10 PM

I am trying to get my turtle to drop his inventory after returning from a trip. This is the code for him to drop the stuff:
for i = 1,16 do
	turtle.select(i)
	turtle.drop()
end
  print("dropped")
  turtle.select(1)

It worked fine if I separate it into its own program, but the turtle ignores the turtle.drop() command completely in my code. I don't have anything I know of that could interfere with it. What could interfere with the drop command.

#2 ChunLing

  • Members
  • 2,027 posts

Posted 30 December 2012 - 07:27 PM

Huh. Okay, I'm stumped. That looks just like the code I use to dump inventory into a chest, and mine works fine.

#3 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

Posted 30 December 2012 - 07:34 PM

What's your ComputerCraft version?

#4 Trot

  • Members
  • 9 posts

Posted 30 December 2012 - 07:44 PM

View PostKingdaro, on 30 December 2012 - 07:34 PM, said:

What's your ComputerCraft version?

1.4

#5 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

Posted 30 December 2012 - 07:56 PM

Bleh, that's not the problem then. According to the wiki, the function only fails if the inventory in front of it is full. :/

#6 Luanub

    Lua Nub

  • Members
  • 1,135 posts
  • LocationPortland OR

Posted 30 December 2012 - 08:07 PM

What are you trying to drop it into? Have you tried it directly onto the ground? Its probably a physical setup issue.

#7 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 30 December 2012 - 10:02 PM

Have you maybe overwritten the function in your code?

#8 Trot

  • Members
  • 9 posts

Posted 31 December 2012 - 05:27 AM

View Postluanub, on 30 December 2012 - 08:07 PM, said:

What are you trying to drop it into? Have you tried it directly onto the ground? Its probably a physical setup issue.

You were correct, Just figured it out after a night's sleep. The turtle was facing the disk drive and was probably trying to place all the inventory into the slot, but couldn't.





3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users