View Single Post
11/19/14, 05:17 PM   #7
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
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 View Post
Oh and so the other part of your code would have to be changed to:
Lua Code:
  1. -- notice, no quotes around ITEMTYPE_ARMOR
  2. if item_type == ITEMTYPE_ARMOR then
  3.    local armor_type= GetItemLinkArmorType(item_link)
  4. 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:
  1. local armor_type
  2. if item_type == ITEMTYPE_ARMOR then
  3.     armor_type= GetItemLinkArmorType(item_link)
  4. end

Last edited by Garkin : 11/19/14 at 05:23 PM.
  Reply With Quote