04.07.2012, 13:33
Thanks! It works fine if I put 0 in the element end. Is it possible without 0(zero)?
EDIT:
if the array is with Float tag, strlen gives tag mismatch
:
pawn Code:
new
array1[ ][ ] = {
{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 }, // there is 9 numbers
{ 1, 2, 3, 4, 5, 0 }, // there is 5 numbers
{ 1, 2, 3, 4, 5, 6, 0 } // there is 6 numbers
}
;
if the array is with Float tag, strlen gives tag mismatch
![Confused](images/smilies/confused.png)
pawn Code:
new
Float:array1[ ][ ] = {
{ 1.1, 9.8, 2.5, 0.0 }, // there is 3 numbers
{ 1.6, 5.1, 0.0 }, // there is 2 numbers
{ 1.2, 5.3, 6.0, 5.3, 0.0 } // there is 4 numbers
}
;
printf( "%d", strlen( array1[ 0 ] ) ); // tag mismatch
printf( "%d", strlen( array1[ 1 ] ) ); // tag mismatch
printf( "%d", strlen( array1[ 2 ] ) ); // tag mismatch