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

[1.31] turtle.drop([amount]) does nothing when amount specified

Started by allbad, 20 May 2012 - 06:08 PM
allbad #1
Posted 20 May 2012 - 08:08 PM
turtle.drop() works as expected where all items in the stack are dropped.

turtle.drop(1) *should* drop only 1 item if I'm interpreting the API correctly. In 1.31 bukkit ported version, it does nothing.

I seached through the forums for a similar issue and hadn't found one on what I would've thought a commonly used command. Was this syntax introduced in 1.31?
Cloudy #2
Posted 20 May 2012 - 10:23 PM
Bukkit bugs should not be reported here. However, I will look into it for you as I am one of the maintainers of the bukkit port.
ComputerCraftFan11 #3
Posted 25 May 2012 - 04:11 AM
turtle.drop() works as expected where all items in the stack are dropped.

turtle.drop(1) *should* drop only 1 item if I'm interpreting the API correctly. In 1.31 bukkit ported version, it does nothing.

I seached through the forums for a similar issue and hadn't found one on what I would've thought a commonly used command. Was this syntax introduced in 1.31?

This can easily be fixed like this:

function drop( _tAmmount )
  if _tAmmount == null then _tAmmound = 1 end
  for i = 1, _tAmmount do
    turtle.drop()
  end
end
PixelToast #4
Posted 25 May 2012 - 04:13 AM
turtle.drop() works as expected where all items in the stack are dropped.

turtle.drop(1) *should* drop only 1 item if I'm interpreting the API correctly. In 1.31 bukkit ported version, it does nothing.

I seached through the forums for a similar issue and hadn't found one on what I would've thought a commonly used command. Was this syntax introduced in 1.31?

This can easily be fixed like this:

function drop( _tAmmount )
  if _tAmmount == null then _tAmmound = 1 end
  for i = 1, _tAmmount do
	turtle.drop()
  end
end
he knows this, he is just reporting that turtle.drop(ammount) dosent work
ComputerCraftFan11 #5
Posted 25 May 2012 - 04:16 AM
turtle.drop() works as expected where all items in the stack are dropped.

turtle.drop(1) *should* drop only 1 item if I'm interpreting the API correctly. In 1.31 bukkit ported version, it does nothing.

I seached through the forums for a similar issue and hadn't found one on what I would've thought a commonly used command. Was this syntax introduced in 1.31?

This can easily be fixed like this:

function drop( _tAmmount )
  if _tAmmount == null then _tAmmound = 1 end
  for i = 1, _tAmmount do
	turtle.drop()
  end
end
he knows this, he is just reporting that turtle.drop(ammount) dosent work

I was just posting a "fix" for people who don't know how to fix it so they won't keep posting about bukkit bugs.
Cloudy #6
Posted 25 May 2012 - 09:31 AM
But that fix wouldn't work. It would drop whole stacks instead of single items.

I'll look into it when I get time, being a maintainer of the bukkit port. Not sure when though as just moved house.
allbad #7
Posted 26 May 2012 - 02:38 PM
Thanks for looking into this cloudy. I have verified this bug in 1.33 as well (bukkit port, again).
OffLine #8
Posted 20 July 2012 - 12:13 PM
Hi guys, Im playing bukkit server and have same problem. tried to use

function drop( _tAmmount )
  if _tAmmount == null then _tAmmound = 1 end
  for i = 1, _tAmmount do
	    turtle.drop()
  end
end
but it is not working. Could you give me the fix? Tried to download another fix, but it allows turtles to break blocks which protected by WorldGuard.
Cloudy #9
Posted 20 July 2012 - 02:52 PM
Please go to the updated thread on the MCPortCentral forums which has an updated bukkit port.
Noodle #10
Posted 21 July 2012 - 12:53 PM
Updated bukkit port is reported not working for the newest update and numerous other updates. (101 +) (I've tested on my server and it doesn't work)
Cloudy #11
Posted 21 July 2012 - 01:10 PM
Except you posted the bug report before I even released the new version of the port. So you are incorrect.
Noodle #12
Posted 21 July 2012 - 01:24 PM
^^ You just replied
RELEASE 3!
I haven't tested yet so..
Cloudy #13
Posted 21 July 2012 - 02:14 PM
Test it along with the latest version of the bukkit port. If it doesn't work I'll have to work around it for when I do the 1.4 bukkit port.
Noodle #14
Posted 21 July 2012 - 03:46 PM
Tested and works.
Cloudy #15
Posted 21 July 2012 - 05:53 PM
Woot! Thanks for the report! That's a load off my mind.
Noodle #16
Posted 23 July 2012 - 04:35 AM
@Cloudy
It still crashes when you run a program for a while with sleep(0) - Your own MC it crashes.
Cloudy #17
Posted 23 July 2012 - 10:15 AM
Do you have a crash log? Or code to repeat it? There's no way the bukkit code even alters anything like that, or could cause a client crash.
Noodle #18
Posted 23 July 2012 - 10:55 AM
Just go into the program "lua"
(v133 Bukkit Build, R3 CC)
And type, "while true do sleep(0) rednet.receive() end"
Cloudy #19
Posted 23 July 2012 - 05:12 PM
What makes you think that it crashes? Do you have a crash log? I'm not going to test it out based on a vague description with sparse details.

Do you have a server I could join?
Noodle #20
Posted 24 July 2012 - 12:19 AM
Yea, my server. IDK what happened though.
It ONLY crashes the client that inputs that line of code… IDK some glitch.