Attempts to equip an arbitrary item. The item is automatically equipped in the first available slot in which it fits. To equip an item in a specific slot, see EquipCursorItem()
.
Causes an error message (UI_ERROR_MESSAGE
) if the specified item cannot be equipped. Does nothing if the specified item does not exist or is not in the player's possession.
See also Item functions, Inventory functions.
Signature:
EquipItemByName(itemID)
or
EquipItemByName("itemName")
or
EquipItemByName("itemLink")
Arguments:
itemID
- An item's ID (number
)itemName
- An item's name (string
)itemLink
- An item's hyperlink, or any string containing theitemString
portion of an item link (string
)