Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:API GetBagName
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{wowapi}} ;''Arguments'' :;:(bagID) :::;[[API TYPE 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. Actually, for this method, this parameter is valid as [[API_ContainerIDToInventoryID]]. ---- ;''Returns'' :;bagName :: bagName - the name of the specified bag (example "Green Woolen Bag") ---- ;''Examples'' local bagName = GetBagName(0); -- Returns localized "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(5) will give the name of the first bank bag, GetBagName(6) the name of the second bank bag, etc ... When coding, use the global variables (NUM_BAG_SLOTS, etc, ...) instead of hard coding these numbers, in case they change in the future. For details, see [[BagId]]. ---- ;''Notes'' : It seems that there is no way to check the keyholder name; GetContainerNumSlots and GetBagName returns 32 and nil while bagID is -2. :: GetBagName(-2) - returns nil :: GetContainerNumSlots(-2) - always returns 32
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)