PDA

View Full Version : Concat Variables NOT THE STRINGS INSIDE THE VARIABLES


stickck
07-25-2006, 12:43 AM
What I'm trying to do is reduce the number of lines of code from 54 to 5 plus the comment line. Is there a way to concat a variable? I know I put "" around false; that's because I am passing that string to a SQLite database. It's still in the development stage.


-- A for loop that counts from 1 to 10
min = 1; -- The number to start at
max = 54; -- The number to stop at
for count = min, max do
sProg..count = "false"
end

any suggestions?

chris

bule
07-25-2006, 03:48 AM
Use a table.

stickck
07-25-2006, 06:16 AM
do you mean like this...

-- A for loop that counts from 1 to 10
sProg = {}
min = 1; -- The number to start at
max = 54; -- The number to stop at
for count = min, max do
sProg[count] = "false"
end

Chris

bule
07-25-2006, 11:26 AM
Yeah. :) :thumbup: