Quote:
Originally Posted by LeToucan
So since enum structs are treated as an array, when using array fields they are treated as 2 dimensional arrays, and thus wouldn't correctly work with ArrayLists? The section outlining using them with ArrayLists could be updated, as this part makes it seem like my snippet should work.
|
While I can't say I know how Pawn internally treats 2-dimensional arrays, in this case you're storing an array reference nside another array.
It helps if you know arrays are a reference type. When I say that, I mean when you do this:
PHP Code:
int players[MAXPLAYERS+1];
you're actually creating an array with a length of
MAXPLAYERS+1, then storing the
memory address of the start of that array in
players
__________________