Arvenis3879@legacy41525273 (talk | contribs) No edit summary |
Arvenis3879@legacy41525273 (talk | contribs) mNo edit summary |
||
Line 17: | Line 17: | ||
local texture, itemCount = GetInventorySlotInfo(2); |
local texture, itemCount = GetInventorySlotInfo(2); |
||
− | : If you only |
+ | : If you are only interested in one of these values you can use the _ character to ignore the texture or the itemCount. |
local _,itemCount = GetInventorySlotInfo(2); |
local _,itemCount = GetInventorySlotInfo(2); |
Revision as of 16:16, 24 February 2005
- Arguments
- slot
- number - slot number of the Inventory item you want the info for.
- Returns
- texture, itemCount
- texture - the texture for the item in the specified slot
- itemCount - the number of items in the specified slot
- Examples
- You'll need 2 variables in order to use the function.
local texture, itemCount = GetInventorySlotInfo(2);
- If you are only interested in one of these values you can use the _ character to ignore the texture or the itemCount.
local _,itemCount = GetInventorySlotInfo(2); local texture,_ = GetInventorySlotInfo(2);
- Result
- The texture variable will contain the item's texture and the itemCount variable will contain the number of that item in the slot.
Template:WoW API