ESODecoded

GetSlotStackSize

ESO Lua API function — used by 98 of the 3,030 addons we indexed (combined 17,168,002 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.

Official signature

GetSlotStackSize([Bag|#Bag] bagId, integer slotIndex)

Returns: integer stack, integer maxStack

Real usage — from LibLazyCrafting

	for slotIndex = 0, maxSlotId do
		inventory[slotIndex] = GetSlotStackSize(bagId, slotIndex)
		total = total + inventory[slotIndex]

Short excerpt from the shipping addon LibLazyCraftingits ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.

Most-downloaded addons using it

AddonTotal downloads
LibLazyCrafting6,538,592
Research Assistant (Find your researchable items)1,749,216
Auto Category - Revised1,180,586
Dustman1,178,205
Lootdrop, Continued (All in One)1,145,178
Character Knowledge (Research, Motif, Recipe, Furnishing Plan and Scribing Tracker)733,709