View Single Post
10-12-14, 07:18 AM   #8
Choonstertwo
A Chromatic Dragonspawn
 
Choonstertwo's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2011
Posts: 194
Originally Posted by Falleneu View Post
I wish I was better at this, surprising that it even works on Live without issues the way I read this.
On live a lot of functions return 1/nil for "boolean" values, but WoD changes most (if not all) of them to return the actual boolean values true/false instead. Explicitly comparing to 1 works if the function returns 1/nil, but it's best to treat them as booleans so you don't need to worry about the specific values returned as long as they evaluate to true/false in boolean expressions (nil and false evaluate to false, everything else to true).

I'm not sure why Blizzard was using 1/nil in the first place, since even Lua 5.0 (the version of Lua initially used by the game) had proper booleans.