Server Warnings
#1

Hello!

I check what is this crashdetect plugin. When I'm using this, I got these errors:

pawn Код:
[16:25:33] [debug] Run time error 4: "Array index out of bounds"
[16:25:33] [debug]  Accessing element at index 4 past array upper bound 3
[16:25:33] [debug] AMX backtrace:
[16:25:33] [debug] #0 0007614c in public PingKick () from LuxAdmin.amx
I have no idea what these errors mean and how to fix it. Are these errors a problem?

Sorry For Bad English
Reply
#2

Quote:
Originally Posted by ******
Посмотреть сообщение
It means you have an array that's 4 elements big and you access element 5. The valid indices are 0, 1, 2, 3, so you are trying to access index 4 (which, like Milla Jovovich, is the fifth element).
Really hard to understand. How to fix this?

Thank You!
Reply
#3

NoOne Knows?
Reply
#4

Quote:

Really hard to understand

what about it don't you understand?
Reply
#5

pawn Код:
forward PingKick();
public PingKick()
{
    if(ServerInfo[MaxPing] != 0)
    {

        for(new i=0; i<MAX_PLAYERS; i++)
        {
            AccInfo[i][pPing] = 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),"%s has been kicked from the server. (Reason: High Ping (%d) | Average (%d) | Max Allowed (%d) )", PlayerName2(i), GetPlayerPing(i), Average, ServerInfo[MaxPing] );
                    SendClientMessageToAll(grey,string);
                    Kick(i);
                }
            }
        }
    }
}
Reply
#6

Quote:
Originally Posted by [HRD]Mar1
Посмотреть сообщение
pawn Код:
forward PingKick();
public PingKick()
{
    if(ServerInfo[MaxPing] != 0)
    {

        for(new i=0; i<MAX_PLAYERS; i++)
        {
            AccInfo[i][pPing] = 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),"%s has been kicked from the server. (Reason: High Ping (%d) | Average (%d) | Max Allowed (%d) )", PlayerName2(i), GetPlayerPing(i), Average, ServerInfo[MaxPing] );
                    SendClientMessageToAll(grey,string);
                    Kick(i);
                }
            }
        }
    }
}
It works and never mind. I'm using now ladmin, not LuxAdmin. Too many bugs there.
Reply
#7

Im using LuxAdmin 1.5 and it works fine. No bugs in there.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)