#include <a_samp>
new TesteVar[5][3];
public OnGameModeInit()
{
for(new i = 0; i < 100; i++)
printf("TesteVar[%d][0] = %d", i, TesteVar[i][0]);
}
[15/11/13 13:11:25] TesteVar[0][0] = 0 [15/11/13 13:11:25] TesteVar[1][0] = 0 [15/11/13 13:11:25] TesteVar[2][0] = 0 [15/11/13 13:11:25] TesteVar[3][0] = 0 [15/11/13 13:11:25] TesteVar[4][0] = 0 [15/11/13 13:11:25] TesteVar[5][0] = 0 [15/11/13 13:11:25] TesteVar[6][0] = 0 [15/11/13 13:11:25] TesteVar[7][0] = 0 [15/11/13 13:11:25] TesteVar[8][0] = 0 [15/11/13 13:11:25] TesteVar[9][0] = 0 [15/11/13 13:11:25] TesteVar[10][0] = 0 [15/11/13 13:11:25] TesteVar[11][0] = 0 [15/11/13 13:11:25] TesteVar[12][0] = 0 [15/11/13 13:11:25] TesteVar[13][0] = 0 [15/11/13 13:11:25] TesteVar[14][0] = 0 [15/11/13 13:11:25] TesteVar[15][0] = 0 [15/11/13 13:11:25] TesteVar[16][0] = 0 [15/11/13 13:11:25] TesteVar[17][0] = 0 [15/11/13 13:11:25] TesteVar[18][0] = 0 [15/11/13 13:11:25] TesteVar[19][0] = 0 [15/11/13 13:11:25] TesteVar[20][0] = 0 [15/11/13 13:11:25] TesteVar[21][0] = 0 [15/11/13 13:11:25] TesteVar[22][0] = 0 [15/11/13 13:11:25] TesteVar[23][0] = 0 [15/11/13 13:11:25] TesteVar[24][0] = 0 [15/11/13 13:11:25] TesteVar[25][0] = 0 [15/11/13 13:11:25] TesteVar[26][0] = 0 [15/11/13 13:11:25] TesteVar[27][0] = 0 [15/11/13 13:11:25] TesteVar[28][0] = 0 [15/11/13 13:11:25] TesteVar[29][0] = 1677721600 [15/11/13 13:11:25] TesteVar[30][0] = 0 [15/11/13 13:11:25] TesteVar[31][0] = 0 [15/11/13 13:11:25] TesteVar[32][0] = 0 [15/11/13 13:11:25] TesteVar[33][0] = 0 [15/11/13 13:11:25] TesteVar[34][0] = 0 [15/11/13 13:11:25] TesteVar[35][0] = 0 [15/11/13 13:11:25] TesteVar[36][0] = 0 [15/11/13 13:11:25] TesteVar[37][0] = 0 [15/11/13 13:11:25] TesteVar[38][0] = 0 [15/11/13 13:11:25] TesteVar[39][0] = 0 [15/11/13 13:11:25] TesteVar[40][0] = 0 |
[15/11/13 13:14:13] TesteVar[0][0] = 0 [15/11/13 13:14:13] TesteVar[1][0] = 0 [15/11/13 13:14:13] TesteVar[2][0] = 0 [15/11/13 13:14:13] TesteVar[3][0] = 0 [15/11/13 13:14:13] TesteVar[4][0] = 0 |
The array you create is only 5 elements large in the first-dimension, yet you try to access values larger than the size. I don't know what you were expecting but you can't access array values that do not exist in an array.
|
The array you create is only 5 elements large in the first-dimension, yet you try to access values larger than the size. I don't know what you were expecting but you can't access array values that do not exist in an array.
|
He knows that, what he tried to say is that compiling with -d2 breaks (stops) the code (in this case the loop) from continuing accessing the element at an invalid index while compiling with -d0 doesn't stop the code and it keeps looping with all the invalid indexes.
|