|
| 07 Oct 2012 05:36 PM |
how would I make something like this work:
for i=1,10 do a=number..i end
["number"..i] does not work either. |
|
|
| Report Abuse |
|
|
|
| 07 Oct 2012 05:37 PM |
for i = 1,10 do a = (i) print(a) wait(1) end |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 07 Oct 2012 05:39 PM |
for i=1, 10 do print("Number "..i) wait(1) end
|
|
|
| Report Abuse |
|
|
|
| 07 Oct 2012 05:40 PM |
| You need to put parentheses between variables if it's a number. Else, it wouldn't work. I don't know why though. |
|
|
| Report Abuse |
|
|
|
| 07 Oct 2012 07:22 PM |
I want to put "number"before the number i so if i was 5 it would look like this:
print(a) >number5 |
|
|
| Report Abuse |
|
|
|
| 07 Oct 2012 07:33 PM |
for i=1, 10 do print("number"..i) end
|
|
|
| Report Abuse |
|
|
mazer246
|
  |
| Joined: 13 Sep 2007 |
| Total Posts: 412 |
|
| |
|
| |
|
|
| 07 Oct 2012 08:41 PM |
for i = 1,10 do a = (i) print("number"..a) wait(1) end |
|
|
| Report Abuse |
|
|
shred1894
|
  |
| Joined: 30 Aug 2009 |
| Total Posts: 6515 |
|
|
| 07 Oct 2012 08:47 PM |
Actually
for i = 1,10 do wait(1) print("Number = ", i) end
S-1894>(Supreme_Commander_of_Advanced_Zero) |
|
|
| Report Abuse |
|
|
|
| 07 Oct 2012 10:16 PM |
| I dont care about the printing but I need a=number..i, I cannot figure out how to do this, I know how to make it print "number"..i but I need to set a variable to number..i |
|
|
| Report Abuse |
|
|
|
| 07 Oct 2012 10:21 PM |
for i = 1, 10 do a = "number " .. i end
¤ ¤ † K M X D † ¤ ¤ |
|
|
| Report Abuse |
|
|
|
| 08 Oct 2012 03:36 PM |
^Would end up only giving you "number 10" because you're replacing the 'a' variable.
Variables = {}; for i=1, 10 do Variables[i] = "Number "..i; end
print(table.concat(Variables,", ")); |
|
|
| Report Abuse |
|
|
|
| 08 Oct 2012 03:44 PM |
'You need to put parentheses between variables if it's a number. Else, it wouldn't work. I don't know why though.'
wat |
|
|
| Report Abuse |
|
|
|
| 08 Oct 2012 03:48 PM |
@blackboy;
No you don't?... |
|
|
| Report Abuse |
|
|