Quantcast
WoWInterface - View Single Post - Concatenation problem
View Single Post
05-04-15, 01:18 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,928
Originally Posted by suicidalkatt View Post
That being said, a global with that name is just asking for trouble.
To further expand on this, all addons share the global namespace along with the default UI. Generic names like minduration is likely to cause problems with other addons because they would be accessing the same variable, causing data corruption. This is why it's standard practice to prefix any globals with the name of your addon.



Originally Posted by Benalish View Post
This code returns this error:

unexpected symbol near "["

in correspondence of line

enabled = ["min"..option].cbutton:GetChecked(),

Is a concatenation lua problem? There is a solution?
This error has nothing to do with concatenation. The brackets [] are used as indexing operators on tables and you haven't specified a table to index.
__________________
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 : 05-04-15 at 01:24 PM.
  Reply With Quote