WoW:API GetContainerNumSlots: Difference between revisions

Formatting mostly
No edit summary
(Formatting mostly)
Line 1: Line 1:
<center>'''GetContainerNumSlots''' ''-Documentation by [[user:Arvenis|Arvenis]]-''</center>
{{wowapi}} __NOTOC__


<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
Return the number of slots available in the bag specified by the index.


  GetContainerNumSlots(bagID);
  numberOfSlots = GetContainerNumSlots(bagID);


<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->
== Parameters ==
=== Arguments ===
:;[[bagID]]
::: Integer - the slot containing the bag, e.g. 0 for backpack, etc.


:Gives you the number of slots available in the bag specified by the index.
=== Returns ===
----
;''Arguments''
:(bagID)
<!-- List each argument, together with its type -->
:;[[API TYPE bagID|bagID]]
::: Integer - the slot containing the bag. Valid slot numbers are 0-4. 0 is the BackPack, 1 is the 2nd Bag and so on.


----
;''Returns''
<!-- List each return value, together with its type -->
:numberOfSlots
:; numberOfSlots
:; numberOfSlots
::: Integer - the number of slots in the specified bag.
::: Integer - the number of slots in the specified bag.
----
;''Notes''


In 1.11.2, it appears that with the Key Ring, GetContainerNumSlots(-2) always returns zero.
== Details ==


This happens if HasKey() is true or false.
* In 1.11.2, it appears that with the Key Ring, GetContainerNumSlots(-2) always returns zero, regardless of whether HasKey() is true or false.
{{WoW API}}
Anonymous user