View Single Post
11-10-14, 08:34 PM   #18
Choonstertwo
A Chromatic Dragonspawn
 
Choonstertwo's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2011
Posts: 194
Originally Posted by myrroddin View Post
I should point out that checking for 1/nil does not work as per above. If you do find a 1/nil, you will have to check, but there are a few ways.
That's not actually the case. Lua's if statement works with any value, not just booleans. nil and false are false-equivalent, all other values are true-equivalent. if a then will still work as expected if a is 1/nil instead of true/false.

Last edited by Choonstertwo : 11-10-14 at 08:40 PM.
  Reply With Quote