Thread Tools Display Modes
12-28-09, 04:57 AM   #1
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
Originally Posted by SDPhantom View Post
That's odd, because the expression nil acts as false, so this should return "LOL" as well regardless of whether or not nil was manually assigned to the variable or table entry.

Edit: Just to make sure, I ran this through Lua and it works as I had described.
Note that if you are trying to get a value from a table while the variable is no table at all, it will always fail, even when you have an "or" set. Then you should you this:

Code:
print(type(foo)=="table" and foo.bar or "LOL")
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Error 'attempt to concatenate global'


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off