Server Problem - OnPlayerDeath - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Server Problem - OnPlayerDeath (
/showthread.php?tid=662253)
Server Problem - OnPlayerDeath -
PoniStar - 27.12.2018
hi guys , so when i killed my self this mssg showed up in SAMP-SERVER.EXE (i mean , in that black window [console])
Код:
[15:23:16] [debug] Run time error 4: "Array index out of bounds"
[15:23:16] [debug] Attempted to read/write array element at index 65535 in array of size 1000
[15:23:16] [debug] AMX backtrace:
[15:23:16] [debug] #0 0009b768 in public AB_OnPlayerDeath (0, 65535, 255) in wwar.amx
[15:23:16] [debug] #1 00005714 in public OnPlayerDeathWeapons (0, 65535, 255) in wwar.amx
[15:23:16] [debug] #2 000011d0 in public OnPlayerDeath (0, 65535, 255) in wwar.amx
how can i find the problem ? i think its related to onplayerdeath because when i killed my self i got this mssg but i didnt see any thing unusuall in server but maybe its happening and i just cant see the problem in server how can i fix this help me please!
- srry for my badenglish
Re: Server Problem - OnPlayerDeath -
SyS - 27.12.2018
You should check if
killerid is valid or not before using it as an index.When a player kills himself the callback is called with
INVALID_PLAYER_ID value for
killerid parameter.
Refer:
https://sampwiki.blast.hk/wiki/OnPlayerDeath
Re: Server Problem - OnPlayerDeath -
PoniStar - 02.01.2019
hi, guys i cant fix this , i didnt find the problem , is there anyway to find the line that make this problem? crash detect not showing anything please helpme , if you die "ON ANY WAY" , kill buy weapon shot , explosion or anything else this will apear in Samp-Server.exe (console)
Код:
[15:23:16] [debug] Run time error 4: "Array index out of bounds"
[15:23:16] [debug] Attempted to read/write array element at index 65535 in array of size 1000
[15:23:16] [debug] AMX backtrace:
[15:23:16] [debug] #0 0009b768 in public AB_OnPlayerDeath (0, 65535, 255) in wwar.amx
[15:23:16] [debug] #1 00005714 in public OnPlayerDeathWeapons (0, 65535, 255) in wwar.amx
[15:23:16] [debug] #2 000011d0 in public OnPlayerDeath (0, 65535, 255) in wwar.amx
Re: Server Problem - OnPlayerDeath -
GhostHacker9 - 02.01.2019
SyS already gave you the solution.Check if killerid is invalid or not before using it as an array index.
Re: Server Problem - OnPlayerDeath -
xRadical3 - 02.01.2019
Please post your public OnPlayerDeath
Re: Server Problem - OnPlayerDeath -
PoniStar - 02.01.2019
thnx guys problem fixed (+rep for all !)