server
server copied to clipboard
🐛 npcUtil.giveItem does not work with the silent parameter when giving more than 1 item
I affirm:
- [x] I understand that if I do not agree to the following points by completing the checkboxes my issue will be ignored.
- [x] I have read and understood the Contributing Guide and the Code of Conduct.
- [x] I have searched existing issues to see if the issue has already been opened, and I have checked the commit log to see if the issue has been resolved since my server was last updated.
OS / platform the server is running (if known)
Windows 10
Branch affected by issue
base
Steps to reproduce
use npcUtil.giveItem(player, { { xi.item.MAGICMART_FLYER, 14 }, { silent = true } })
In your log, you will get ERROR: invalid items parameter given to npcUtil.giveItem in zone X. (lua_print:222)
Expected behavior
Ability to use the silent parameter on npcUtil.giveItem giving multiple of the same item. Currently it appears to only work if you are only giving out 1 item, I.E. npcUtil.giveItem(player, xi.item.BLUE_RIBBON, { silent = true })
The syntax is wrong in your example npcUtil.giveItem(player, { { xi.item.MAGICMART_FLYER, 14 }, { silent = true } }) should be npcUtil.giveItem(player, { { xi.item.MAGICMART_FLYER, 14 } }, { silent = true })