• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] 3d iterator array
#1
Hi i?have the latest version of ysi 5.05.0301 but i have a problem with 3d iterator array.





Code:
new

Iterator:Iter3[5][8]<10>;

for (new i = 0; i != Iter_InternalSize(Iter3); )

{

Iter_Init(Iter3[i]);

}

Iter_Add(Iter3[3][6], 7);







Errors:





error 017: undefined symbol "Iter_InternalSize"

error 028: invalid subscript (not an array or too many subscripts): "Iter_Init@Iter3"

warning 215: expression has no effect

error 001: expected token: ";", but found "]"

error 029: invalid expression, assumed zero

fatal error 107: too many error messages on one line





i also tried this





Code:
#define SIZE 5

new

Iterator:Iter3[SIZE][8]<10>;

for (new i = 0; i != SIZE; )

{

Iter_Init(Iter3[i]);

}

Iter_Add(Iter3[3][6], 7);





and this





Code:
for (new i = 0; i != Iter_InternalSize(Iter3); )

{

Iter_InitInternal(Iter_InternalArray(Iter3[i]), Iter_InternalSize(Iter3[]), Iter_InternalSize(Iter3[][]) - 1);

}





but its doesnt work



Pls help
  Reply
#2
1. Don't use functions with "Internal" in their name - they are internal to the library.



2. I've never tested with 3d arrays, pawn doesn't really do 3d arrays and I'd be amazed if it worked at all. Honestly, you really shouldn't even need a 3d array ever.
  Reply


Forum Jump: