title: Concat two variable values with space in Lua
body: <p>I have a string I am trying to build out of a variable containing strings and a space and an another string(integer.)  The string needs to consist of index numbers based on the number of elements in a table called "master_table" The first time through the variable "indexes_to_process" is nil.  I am trying to use the stanza below to set it.  However, it still contains a nil value even through x is set correctly.  I am sure this is some syntax gotcha that I am drawing a blank on.  I've tried several alterations to this and nothing works.  Would appreciate any suggestions.  The goal is to have a variable that contains the following:</p>
  
  <p>"1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"  and so on.  I am doing this so I can have a variable control loop of thousands to millions of index numbers. . . .this was my solution to address slow table processing after 100K elements.   Ie., I want to be able to add index numbers to the variable "indexes_to_process" so that loop will hit this element.  This save me processing empty elements in the table because the processing through all table elements takes too long after I get into the 100K range and I have maybe 10K elements that need to be processed.</p>
  
  <p>Thanks in Advance!</p>
  
  <pre><code>if indexes_to_process == nil then
                              for x = 1,table.maxn(master_table) do
                                  print ("x:"..x)                         --uncomment for debug
                                  indexes_to_process = (indexes_to_process," ",x)
                                  print ("indexes to process",indexes_to_process)         --uncomment for debug
                              end
  end
  </code></pre>