[23:58:43] [debug] Run time error 4: "Array index out of bounds"
[23:58:43] [debug] Attempted to read/write array element at index 682 in array of size 682
[23:58:43] [debug] AMX backtrace:
[23:58:43] [debug] #0 0001cc7c in Bar:CreateProgressBar (Float:x=530.00000, Float:y=12.00000, Float:width=100.50000, Float:height=2.50000, color=-65281, Float:max=100.00000) at C:\Users\Junin\Desktop\Pawno\include\progressbar.inc:71
[23:58:43] [debug] #1 002a965c in CarregarInfoP (playerid=0) at C:\Users\Juninl\Desktop\GM NEW VERSГO\gamemodes\GMteste.pwn:42915
[23:58:43] [debug] #2 0014359c in public Ips_OnPlayerSpawn (playerid=0) at C:\Users\Junin\Desktop\GM NEW VERSГO\gamemodes\GMteste.pwn:19290
[23:58:43] [debug] #3 0000c8d8 in public OnPlayerSpawn (playerid=0) at C:\Users\Juninl\Desktop\Pawno\include\iLoops.inc:121
[23:58:47] Marcos_Junior digitou /spawn
[23:58:47] [debug] Run time error 4: "Array index out of bounds"
[23:58:47] [debug] Attempted to read/write array element at index 682 in array of size 682
[23:58:47] [debug] AMX backtrace:
[23:58:47] [debug] #0 0001cc7c in Bar:CreateProgressBar (Float:x=530.00000, Float:y=12.00000, Float:width=100.50000, Float:height=2.50000, color=-65281, Float:max=100.00000) at C:\Users\Juninl\Desktop\Pawno\include\progressbar.inc:71
[23:58:47] [debug] #1 002a965c in CarregarInfoP (playerid=0) at C:\Users\Junin\Desktop\OSB NEW VERSГO\gamemodes\GMteste.pwn:42915
[23:58:47] [debug] #2 0014359c in public Ips_OnPlayerSpawn (playerid=0) at C:\Users\Junin\Desktop\GM NEW VERSГO\gamemodes\GMteste.pwn:19290
[23:58:47] [debug] #3 0000c8d8 in public OnPlayerSpawn (playerid=0) at C:\Users\Junin\Desktop\Pawno\include\iLoops.inc:121
[23:58:47] Marcos_Junior digitou /spawn
o que tem na public OnPlayerSpawn? |
[23:58:43] [debug] Run time error 4: "Array index out of bounds"
[23:58:43] [debug] Attempted to read/write array element at index 682 in array of size 682
Vocк esta tentando acessar um нndice que nгo existe em uma array como mostra as mensagens abaixo do sue log:
PHP код:
|
new Array[2]; //Array com 2 нndices, 0 e 1
new indice = 3;
Array[indice] = 4; //Tentando acessar o нndice 3 que nгo existe, irб gerar um erro na hora de execuзгo
new Array[3]; //Array com 3 нndices, 0, 1 e 2
//Loop vai rodar de 0 a 3, jб que no caso a condiзгo diz que deve incrementar a variбvel i quando ela for menor ou igual a 3.
//E nesse caso irб tentar acessar o нndice 3 que nгo existe.
for(new i; i <= sizeof(Array); i++){
Array[i] = i + 1;
}