Foreach multi dimension arrays
#1

Hey there

I've got some problems with theese multi dimension arrays in foreach... I'd like to create a new iterator and select random of them...

First, i tried to declare that but i've got errors... it this method possible or i can use just 2 dimension array?
Код:
static Iterator:Thing[4][5]<100>;
Код:
error 001: expected token: ";", but found "-integer value-"
error 017: undefined symbol "Iter_Single@Thing
but this works fine
Код:
static Iterator:Thing[5]<100>;
Reply
#2

If you want a two dimensional array, you can do:

PHP код:
new Iterator:Something<1st_dim_upperbound2nd_dim_upperbound>; 
Example:

PHP код:
new Iterator:Something<3010>; 
In your case, this would be correct:

PHP код:
static Iterator:Thing<5100>; 
Reply
#3

But where is the '4' array?
I mean this.

Код:
static Iterator:Thing[4][5]<100>;
I would declare that 2 arrays and 100 slots to it.
Reply
#4

anyone? :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)