Quantcast
WoWInterface - View Single Post - Concatenation problem
View Single Post
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