Debug


Započeo // lestra, Jun 01, 2019, 23:24:29 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Sad testam nesto ig i kucam na sb /kill i kad me ubije normalno radi al baca debug u log
Deo skripte: [ pawn ]vaš odgovor[ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): https://pastebin.com/4JsCYpcE
Slika/video ingame problema(obavezno ako je ingame problem): link slike
Poslednja Izmena: Jun 04, 2019, 20:00:42 POSLE PODNE od Bašovski
AKO ZNAS ZA BOGA I ZA GLAVU ZIVU NE BRANI MI DOKTORE RAKIJU I PIVU

Hahah znao sam nisam morao ni ulaziti u log ali ajde da proverim samo.
Ovako killerid ti je 65535 znaci INVALID PLAYER ID
sto bi znacilo da trebas da imas proveru if(killerid == (ili) != (zavisi od situacije) INVALID_PLAYER_ID )

You MUST check whether 'killerid' is valid (not INVALID_PLAYER_ID) before using it in an array (or really anywhere), as it will cause the OnPlayerDeath script to crash (not the entire script). This is because INVALID_PLAYER_ID is defined as 65535, and if an array only has 'MAX_PLAYERS' elements, e.g. 500, you're trying to access an index that is above 499, which is out of bounds.

https://wiki.sa-mp.com/wiki/OnPlayerDeath

Izvinjavam se zbog bumpa jebiga fon nmg da quote eto vam i bag xD

Citat: Zile42O poslato Jun 02, 2019, 05:06:33 PRE PODNE
You MUST check whether 'killerid' is valid (not INVALID_PLAYER_ID) before using it in an array (or really anywhere), as it will cause the OnPlayerDeath script to crash (not the entire script). This is because INVALID_PLAYER_ID is defined as 65535, and if an array only has 'MAX_PLAYERS' elements, e.g. 500, you're trying to access an index that is above 499, which is out of bounds.

https://wiki.sa-mp.com/wiki/OnPlayerDeath

Izvinjavam se zbog bumpa jebiga fon nmg da quote eto vam i bag xD
Fala radi <3
AKO ZNAS ZA BOGA I ZA GLAVU ZIVU NE BRANI MI DOKTORE RAKIJU I PIVU