WoW:API GetBagName: Difference between revisions
Jump to navigation
Jump to search
GetBagName -Documentation by Arvenis-
m (Notes) |
(upgraded deprecated template) |
||
Line 1: | Line 1: | ||
{{wowapi}} | |||
<center>'''GetBagName''' ''-Documentation by [[user:Arvenis|Arvenis]]-''</center> | <center>'''GetBagName''' ''-Documentation by [[user:Arvenis|Arvenis]]-''</center> | ||
---- | ---- | ||
Line 28: | Line 29: | ||
:: GetBagName(-2) - returns nil | :: GetBagName(-2) - returns nil | ||
:: GetContainerNumSlots(-2) - returns 0 | :: GetContainerNumSlots(-2) - returns 0 | ||
Revision as of 17:26, 6 January 2007
← WoW API < GetBagName
- Arguments
-
- (bagID)
-
- bagID
- number - number of the bag the item is in, 0 is your backpack, 1-4 are the four additional bags, numbered right to left.
- Returns
- bagName
- bagName - the name of the specified bag (example "Green Woolen Bag")
- Examples
local bagName = GetBagName(0); --Returns "Backpack"
- Result
- bagName will contain the name of the specified bag if the bag number is 0-4 otherwise it will be nil, unless when the bank is opened, in which case GetBagName(-1) (for the bank) is nil and GetBagName(6) will give the name of the first bank bag, GetBagName(7) the name of the second bank bag, etc ...
- Notes
- It seems that there is no way to check the keyholder content; GetContainerNumSlots and GetBagName returns 0 and nil while bagID is -2.
- GetBagName(-2) - returns nil
- GetContainerNumSlots(-2) - returns 0