13.09.2013, 14:55
Hello,
Few minutes ago my server was crashing every 5-10 minutes.
I think this was caused by a hacker.
Anyway I have run the gamemode with crashdetect and this came out >
[16:38:45] [debug] Run time error 4: "Array index out of bounds"
[16:38:45] [debug] Accessing element at index 65535 past array upper bound 79
[16:38:45] [debug] AMX backtrace:
[16:38:45] [debug] #0 0005ceb4 in public OnPlayerTakeDamage () from x_gamemode.amx
Which means for some reason a playerid which was 65535 came into OnPlayerTakeDamage, and this caused the server to crash.
So I added ,
if(issuerid > MAX_PLAYERS || playerid > MAX_PLAYERS) return 0;
Under OnPlayerTakeDamage (at the top).
Im not sure if it has been fixed, but the server hasn't been crashed since so I guess it did.
So if someone can confirm that this is working then others can use it too, to prevent crashers.
Few minutes ago my server was crashing every 5-10 minutes.
I think this was caused by a hacker.
Anyway I have run the gamemode with crashdetect and this came out >
[16:38:45] [debug] Run time error 4: "Array index out of bounds"
[16:38:45] [debug] Accessing element at index 65535 past array upper bound 79
[16:38:45] [debug] AMX backtrace:
[16:38:45] [debug] #0 0005ceb4 in public OnPlayerTakeDamage () from x_gamemode.amx
Which means for some reason a playerid which was 65535 came into OnPlayerTakeDamage, and this caused the server to crash.
So I added ,
if(issuerid > MAX_PLAYERS || playerid > MAX_PLAYERS) return 0;
Under OnPlayerTakeDamage (at the top).
Im not sure if it has been fixed, but the server hasn't been crashed since so I guess it did.
So if someone can confirm that this is working then others can use it too, to prevent crashers.