WoWInterface - View Single Post - Cache suggestions
View Single Post
07-28-17, 02:40 PM   #7
A Pyroguard Emberseer
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,934
Explaining why, {}=={} is not doing anything special to compare values in tables. What it does is create two completely different tables and compare their pointers. Since they are exactly two different tables, their pointers are different and this results in false. If you want to check if the table is empty, the most basic way is to call next(wait) and see if it returns nil.
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 07-28-17 at 02:45 PM.
  Reply With Quote