Server Problem - OnPlayerDeath
#1

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
Reply
#2

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
Reply
#3

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
Reply
#4

SyS already gave you the solution.Check if killerid is invalid or not before using it as an array index.
Reply
#5

Please post your public OnPlayerDeath
Reply
#6

thnx guys problem fixed (+rep for all !)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)