Quantcast
Concatenation problem - WoWInterface
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-04-15, 05:53 AM   #1
Benalish
A Theradrim Guardian
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 60
Concatenation problem

Hi all. This is a fuction of my code

Lua Code:
  1. function onAdvancedOptionClose()
  2.     local options = { 'duration', 'stack' }
  3.     for i=1, #options do
  4.         local option = options[i]
  5.  
  6.         if not db[option] then
  7.             db[option] = { minimum = {}, maximum = {} }
  8.         end
  9.  
  10.         db[option].minimum = {
  11.             enabled = ["min"..option].cbutton:GetChecked(),
  12.             value = tonumber(["min"..option].ebox:GetText())
  13.         }
  14.  
  15.         db[option].maximum = {
  16.             enable = ["max"..option].cbutton:GetChecked(),
  17.             value = tonumber(["max"..option].ebox:GetText())
  18.         }
  19.  
  20.     end
  21. end

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?
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Concatenation problem

Thread Tools
Display Modes

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