[Ajuda] Run time error 4: "Array index out of bounds" - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Run time error 4: "Array index out of bounds" (
/showthread.php?tid=634191)
Run time error 4: "Array index out of bounds" -
Laarky - 14.05.2017
Galera estou com outro bug aqui,e pra galera q falar ver no search ,eu ja pesquisei la,so que nгo consegui resolver
PHP код:
[03:40:55] [debug] Run time error 4: "Array index out of bounds"
[03:40:55] [debug] Attempted to read/write array element at negative index -1
[03:40:55] [debug] AMX backtrace:
[03:40:55] [debug] #0 001534d4 in ?? (1) from CC2.0.amx
[03:40:55] [debug] #1 00065d64 in public SSCANF_OnPlayerDisconnect (1, 1) from CC2.0.amx
[03:40:55] [debug] #2 0000b600 in public Itter_OnPlayerDisconnect (1, 1) from CC2.0.amx
[03:40:55] [debug] #3 native CallLocalFunction () from samp-server.exe
[03:40:55] [debug] #4 00005fc8 in public OnPlayerDisconnect (1, 1) from CC2.0.amx
Alguem sabe dizer oq й ?
Re: Run time error 4: "Array index out of bounds" -
aoky - 14.05.2017
I'm not from your country but I clicked this by mistake haha, can you show me your OnPlayerDisconnect?
Re: Run time error 4: "Array index out of bounds" -
Laarky - 14.05.2017
Ok men
PHP код:
public OnPlayerDisconnect(playerid, reason)
{
Desconnectar(playerid);
DeletarSair(playerid);
DestroyVehicle(carroadmin[playerid]);
return 1;
}
Re: Run time error 4: "Array index out of bounds" -
Laarky - 14.05.2017
Alguem ajuda ?
Re: Run time error 4: "Array index out of bounds" -
RodrigoMSR - 14.05.2017
Vocк estб tentando ler uma array com um нndice negativo, exemplo:
Код:
new key = -1;
new array[2];
array[key] = 1;
Re: Run time error 4: "Array index out of bounds" -
Laarky - 14.05.2017
Quote:
Originally Posted by RodrigoMSR
Vocк estб tentando ler uma array com um нndice negativo, exemplo:
Код:
new key = -1;
new array[2];
array[key] = 1;
|
Vlw man,parou de dar o erro,so que agora quando eu dou esc,o servidor simplesmente para de responder ,eu coloquei ela de -1 para 1,pode dar algum erro ?
Re: Run time error 4: "Array index out of bounds" -
RodrigoMSR - 15.05.2017
Depende do que essa variбvel faz e o que cada valor dela causa.