for(var/I = 0; I < 10; I++)
var/mob/Item[I] = new/mob/XYZ //Creates a new variable named Item[I], where I is the current iteration number and assigns it to an new instance of XYZ
ID:271059
Dec 27 2006, 3:01 pm
|
|
What I'd like to do is have a loop that does this:
|
Dec 27 2006, 10:06 pm
|
|
You can't have dynamic variable names.
Using a list, as Android Data posted, is probably as close as you can get. |
In response to Android Data
|
|
It will fail because you didn't initialize the list.
Also, the var/i= part is useless, so just omit it. |