Quantcast WoWInterface - View Single Post - 8.1.5 ItemButtonTemplate Changes
View Single Post
04-06-19, 05:00 AM   #29
A Pyroguard Emberseer
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,107
tkle, you are better off posting this in the Lua/XML help thread in the Developer section of the forums.

Not really to your point, but line 9 contains superfluous code.
Lua Code:
  1. if not SUIDB.A_ITEMLEVEL == true then return end
  3. -- is exactly the same as writing
  5. if not SUIDB.A_ITEMLEVEL then return end
not assumes false or nil values. It does not distinguish between false or nil, so if you are checking against true, false, and nil, then you'd have to specify.
Conversely, these are the same:
Lua Code:
  1. if something then -- assumes true OR a value that is non-nil and non-false, like 1 or "dog"
  3. if something == true then -- also non-false, non-nil, but specifically Boolean
  Reply With Quote