CommandHelper

CommandHelper

46.5k Downloads

pgive_item() docs incorrect (or function incorrect?)

LadyCailinBot opened this issue ยท 6 comments

commented

CMDHELPER-2659 - Reported by opoq

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 LadyCailin

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

commented

Comment by opoq

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

Haha!

commented

Comment by jb_aero

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 ryan_the_leach

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

The docs were fixed in 2374