GetNumBagUsedSlots
ESO Lua API function — used by 53 of the 3,030 addons we indexed (combined 12,157,976 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.
Official signature
GetNumBagUsedSlots([Bag|#Bag] bagId)Returns: integer usedSlots
Real usage — from CraftStore
function CS.InventorySpace(control)
control:SetText(GetNumBagUsedSlots(1) .. '/' .. GetBagSize(1))
if GetBagSize(1) == GetNumBagUsedSlots(1) thenShort excerpt from the shipping addon CraftStore — its ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.
Most-downloaded addons using it
| Addon | Total downloads |
|---|---|
| CraftStore | 5,176,147 |
| Inventory Insight | 2,763,446 |
| Azurah - Interface Enhanced | 1,462,318 |
| Wykkyd Toolbar | 567,448 |
| Info Panel | 368,274 |
| Group Loot Notifier | 363,639 |