Quote:
Originally posted by protagonist
The new commands are so C-ish.
|
"Quotified for quotability"
Quote:
Originally posted by Python523
except in gscript, it is
for (b: a)
what it is doing, is taking each instance of the array a, and assigning it as the value b, it can be the equivilent of
NPC Code:
for (i=0; i<arraylen(a); i++){
b = a[i];
}
|
so, you could do something like this?
NPC Code:
if (created){
a = {2,3,5,8};
setarray c,4;
i=0;
for (b: a){
c[i] = b;
setplayerprop #c,Set c[#v(i)] to #v(c[i]);
i++;
}
}
// pointless yeah & more complicated than it needs to be, but just trying to make sure I understand it