09.05.2017, 19:00
Quote:
Ele esta gerando um erro na hora da execuзгo retornando a funзгo a 0, pois esta acessando um нndice invбlido.
Код:
for( new i = 0; i <= sizeof(itens); i++ ){ Entгo se uma array tem 10 cйlulas e eu fazer como vocк fez o valor de i vai de 0 a 10, mesmo os нndices vбlidos da array sendo 0 a 9, tentando acessar o нndice 10 que nгo existe. Recomendo usar o plugins crashdetect para descobrir erros na hora da execuзгo. |

@edit
baixei o crashdetect e funcionou, testei com esse erro acima e olha:
[15:58:43] [debug] Run time error 4: "Array index out of bounds"
[15:58:43] [debug] Attempted to read/write array element at index 213 in array of size 213
[15:58:43] [debug] AMX backtrace:
[15:58:43] [debug] #0 000107c0 in ?? () from GM_KillerZ.amx
[15:58:43] [debug] #1 0001037c in public Streamer_OnGameModeInit () from GM_KillerZ.amx
[15:58:43] [debug] #2 native CallLocalFunction () from samp-server.exe
[15:58:43] [debug] #3 0000b8c0 in public SSCANF_OnGameModeInit () from GM_KillerZ.amx
[15:58:43] [debug] #4 00005828 in public zcmd_OnGameModeInit () from GM_KillerZ.amx
[15:58:43] [debug] #5 native CallLocalFunction () from samp-server.exe
[15:58:43] [debug] #6 000052a0 in public OnGameModeInit () from GM_KillerZ.amx
mas como eu vejo oq estб errado? oque eu vi foi isso:
[15:58:43] [debug] Run time error 4: "Array index out of bounds"
[15:58:43] [debug] Attempted to read/write array element at index 213 in array of size 213
ele ta falando do problema acima?