GetItemName

From ESOUI Wiki

Jump to: navigation, search

Returns the name of the item in a particular bag slot. If there is no item in that slot, then an empty string will be returned.

Note that the returned name may have format codes on the end (e.g. ^n, which are intended for use by the LocalizeString native function (and the zo_strformat Lua function that wraps it); the returned name may also have inconsistent capitalization compared to other item names (e.g. "rawhide scraps^p" versus "Ichor").

Arguments

bagId
A number representing the bag to check; it must be one of the built-in Bag values.
slotIndex
The numeric index of the slot in that bag which should be checked. For most bags, this is a number ranging from 1 to the size of the bag.

Syntax

-- GIVEN:
-- number bagIndex
-- number slotIndex
--
-- RETURNS: string
local name = GetItemName(bagIndex, slotIndex) -- may contain localization control codes
 
local formattedName = LocalizeString("<<1>>", name) -- no control codes

External links

Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox