SA-MP Forums Archive
[Ajuda] Servidor Reiniciando, Possнvel motivo - 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] Servidor Reiniciando, Possнvel motivo (/showthread.php?tid=614494)



Servidor Reiniciando, Possнvel motivo - iLordGG - 09.08.2016

Entao.. para tentar ver o motivo do meu servidor reiniciar coloquei o plugin crashdetect, e cada pessoa que sai do servidor ele manda algumas mensagens ao console..
Код:
[22:25:50] [debug] Run time error 4: "Array index out of bounds"
[22:25:50] [debug]  Accessing element at negative index -1
[22:25:50] [debug] AMX backtrace:
[22:25:50] [debug] #0 0022ff3c in ?? (8) from MundoReal.amx
[22:25:50] [debug] #1 000b0648 in public Streamer_OnPlayerDisconnect (8, 0) from MundoReal.amx
[22:25:50] [debug] #2 00006394 in public Itter_OnPlayerDisconnect (8, 0) from MundoReal.amx
[22:25:50] [debug] #3 00005dc0 in public OnPlayerDisconnect (8, 0) from MundoReal.amx



Re: Servidor Reiniciando, Possнvel motivo - arakuta - 09.08.2016

Isso acontece quando vocк acessa alguma cйlula inexistente no vetor.

Por definiзгo, o vetor vetor possui 16 cйlulas, numeradas de 0 a 15.

PHP код:
new vetor[16]; 
Tentar acessar outra cйlula, como -1 ou 16 resultarб em erro.

PHP код:
printf("Vetor[16] й %d",vetor[16]); 
Isto nгo й visto no momento da compilaзгo quando fazemos acesso variбvel

PHP код:
new index 10;
new 
vetor[4];
printf("Vetor[%d] й %d",vetor[index],index); 
Sugiro que releia seu cуdigo e tenha certeza que esse tipo de caso nunca possa ocorrer.


Respuesta: Servidor Reiniciando, Possнvel motivo - RedMF - 09.08.2016

Manda os Codes dessas callbacks

Streamer_OnPlayerDisconnect
Itter_OnPlayerDisconnect
OnPlayerDisconnect