i need help
#1

hey all i open my server and evryting fine it work 24/7 with CP and evryting but there is a litle problem crash my server after like 8 hours heres my log server:
[08:11:33] [debug] Run time error 4: "Array index out of bounds"
[08:11:33] [debug] Accessing element at index 4 past array upper bound 3
[08:11:33] [debug] AMX backtrace:
[08:11:33] [debug] #0 0007775c in public PingKick () from LuxAdmin.amx
[08:11:59] [debug] Run time error 4: "Array index out of bounds"
[08:11:59] [debug] Accessing element at index 4 past array upper bound 3
[08:11:59] [debug] AMX backtrace:
[08:11:59] [debug] #0 0007775c in public PingKick () from LuxAdmin.amx
[08:12:25] [debug] Run time error 4: "Array index out of bounds"
[08:12:25] [debug] Accessing element at index 4 past array upper bound 3
[08:12:25] [debug] AMX backtrace:
[08:12:25] [debug] #0 0007775c in public PingKick () from LuxAdmin.amx
its when i start my server and its say it again again again and when it crashed i see
server crashed be excuting Rection.amx
what is this?
Reply
#2

Show public PingKick () Code
Reply
#3

where is it
Reply
#4

Step 1-> Open the pawn Then
Step 2-> Press Ctrl + F and Type public PingKick
You will find that function.

Post that function codes.
Reply
#5

LuxAdmin is so old, you'd be better off finding something else really... It is after all 4 years old since the last update.
Reply
#6

Code:

public PingKick()
{
if(ServerInfo[MaxPing] != 0)
{
PingPos++; if(PingPos > PING_MAX_EXCEEDS) PingPos = 0;

for(new i=0; i<MAX_PLAYERS; i++)
{
AccInfo[i][pPing][PingPos] = GetPlayerPing(i);

if(GetPlayerPing(i) > ServerInfo[MaxPing])
{
if(AccInfo[i][PingCount] == 0) AccInfo[i][PingTime] = TimeStamp();

AccInfo[i][PingCount]++;
if(TimeStamp() - AccInfo[i][PingTime] > PING_TIMELIMIT)
{
AccInfo[i][PingTime] = TimeStamp();
AccInfo[i][PingCount] = 1;
}
else if(AccInfo[i][PingCount] >= PING_MAX_EXCEEDS)
{
new Sum, Average, x, string[128];
while (x < PING_MAX_EXCEEDS) {
Sum += AccInfo[i][pPing][x];
x++;
}
Average = (Sum / PING_MAX_EXCEEDS);
format(string,sizeof(string),"|- Player %s (Id:%d) has been Automatically Kicked. | Reason: High Ping - %d (Average - %d | Max Allowed - %d)", PlayerName2(i),i, GetPlayerPing(i), Average, ServerInfo[MaxPing]);
SendClientMessageToAll(grey,string);
SaveIn("KickLog",string);
Kick(i);
}
}
else if(GetPlayerPing(i) < 1 && ServerInfo[AntiBot] == 1)
{
AccInfo[i][BotPing]++;
if(AccInfo[i][BotPing] >= 3) BotCheck(i);
}
else
{
AccInfo[i][BotPing] = 0;
}
}
}
}
//================================================== ============================
Reply
#7

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
LuxAdmin is so old, you'd be better off finding something else really... It is after all 4 years old since the last update.
if its to old can you find me new system i just looked on all forums and never find someting good like i want
Reply
#8

Quote:
Originally Posted by elhanan
Посмотреть сообщение
if its to old can you find me new system i just looked on all forums and never find someting good like i want
Check mine, BurkeAdminSystem based on dialogs. It's simple, just click a player and select what you'd want to do with him.

The original thread link;
https://sampforum.blast.hk/showthread.php?pid=3679294#pid3679294
Reply
#9

Quote:
Originally Posted by KevinExec
Посмотреть сообщение
Check mine, BurkeAdminSystem based on dialogs. It's simple, just click a player and select what you'd want to do with him.

The original thread link;
https://sampforum.blast.hk/showthread.php?pid=3679294#pid3679294
thank you i will check it
Reply
#10

Can Someone Finaly help me?
Reply
#11

In order to fix the run time error 4, you need to change:
pawn Code:
PingPos++; if(PingPos > PING_MAX_EXCEEDS) PingPos = 0;
to:
pawn Code:
PingPos++; if(PingPos >= PING_MAX_EXCEEDS) PingPos = 0;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)