CommandHelper

CommandHelper

46.5k Downloads

pgive_item() docs incorrect (or function incorrect?)

LadyCailin opened this issue ยท 6 comments

commented

CMDHELPER-2659 - Reported by opoq on 2013-04-27 06:21:44 UTC

The docs state that pgive_item() returns the number of items actually given, but it actually returns the number /not/ given.

Eg, "1000" is echoed when the following code is run on a full inventory:

msg(pgive_item(opoq, 1, 1000, array()))

commented

Comment by opoq on 2013-04-29 23:07:04 UTC

I've got CH building in netbeans, all I need is to farking graduate already and I can fix crap like this myself :)

commented

Comment by EntityReborn on 2013-05-24 04:43:59 UTC

Haha!

commented

Comment by jb_aero on 2013-07-18 06:53:02 UTC

Since you can give negative amounts for "infinite" stacks, I think it makes more sense the way it currently works. Input before I do something about it?

commented

Comment by LadyCailin on 2013-04-29 19:23:27 UTC

The function is incorrect here, I think, not the docs.

commented

Comment by ryan_the_leach on 2013-07-27 19:23:17 UTC

It's more convenient the way it is, normally when giving items and checking whether it was successful, you are trying to catch if anything went wrong.

commented

Comment by PseudoKnight on 2014-03-04 07:08:18 UTC

The docs were fixed in 2374