Ah, circonian is right. I didn't think about what should be in the table. Tables should be defined as circonian said.
Originally Posted by circonian
Oh and so the other part of your code would have to be changed to:
Lua Code:
-- notice, no quotes around ITEMTYPE_ARMOR if item_type == ITEMTYPE_ARMOR then local armor_type= GetItemLinkArmorType(item_link) end
|
Just one comment - if you write it like this, armor_type won't be visible outside of the if ... end code block.
Lua Code:
local armor_type
if item_type == ITEMTYPE_ARMOR then
armor_type= GetItemLinkArmorType(item_link)
end