SA-MP Forums Archive
Server crashing, WHATS THE REASON? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Server crashing, WHATS THE REASON? (/showthread.php?tid=98211)



Server crashing, WHATS THE REASON? - ДitisOnHuora - 19.09.2009

Sometimes my server crash, and ALLWAYS on the serverlog last printed thing is:

Quote:

[21:47:47] [part] Aleksa_Green29 has left the server (4:2)

or

Quote:

[21:26:55] [part] Johnny_Cash has left the server (2:2)

Allways Kicked/Banned... Propably kicked cause no ban's on banlog. I made kick.log to every single thing that kicks the player or bans.. But kicklogs and banlogs are empty!

I Also checked the Filterscripts, they wont kick any player at all.

Im out of ideas, someone help me!


Re: Server crashing, WHATS THE REASON? - Ov3rl0rd - 19.09.2009

Well I am assuming since you said even when you kick someone it does not appear in the log, than you are not calling the file correctly. Meaning you have a code that instead of sending info to the kick log, its causing your server to crash.


Re: Server crashing, WHATS THE REASON? - ДitisOnHuora - 19.09.2009

Quote:
Originally Posted by Ov3rl0rd
Well I am assuming since you said even when you kick someone it does not appear in the log, than you are not calling the file correctly. Meaning you have a code that instead of sending info to the kick log, its causing your server to crash.
No i meant by Logs being empty from the reason that he got kicked. For example if i /kick someone, the kikclog logs it.. :S


Re: Server crashing, WHATS THE REASON? - AiVAMAN - 19.09.2009

You should check log saving code, becouse as overlord saied log crashes server, and wont log anything.


Re: Server crashing, WHATS THE REASON? - ДitisOnHuora - 19.09.2009

Quote:
Originally Posted by -Alive
You should check log saving code, becouse as overlord saied log crashes server, and wont log anything.
As i sayd, it does log every single kick. But players still get kicked and server gets crashed.. But anyway, here is my kicklog...

pawn Код:
forward KickLog(string[]);

public KickLog(string[])
{
    new entry[256];
    format(entry, sizeof(entry), "%s\n",string);
    new File:hFile;
    hFile = fopen("kick.log", io_append);
    fwrite(hFile, entry);
    fclose(hFile);
}

EXAMPLE:

format(string, sizeof(string), "[SERVER]: %s is kicked from the server. Reason: Account banned!", sendername);
KickLog(string);
I dont think that KickLog is part of the reason ?


Re: Server crashing, WHATS THE REASON? - Jakku - 19.09.2009

How about your internet connection?


Re: Server crashing, WHATS THE REASON? - ДitisOnHuora - 19.09.2009

Quote:
Originally Posted by Jakku
How about your internet connection?
Lol.

I have my own host + it wouldnt be the reason. The thing is, that just SOME players will get kicked and then server crashes...




Re: Server crashing, WHATS THE REASON? - ДitisOnHuora - 20.09.2009

Help


Re: Server crashing, WHATS THE REASON? - ДitisOnHuora - 20.09.2009

Now i checked players stats who crashed the server. Turns out that they all have same stats, same password, same admin lvl, same cash amount etc etc.. I remember that i did /changename sometime ago to original guy who haves those stats. Here is my /changename:

pawn Код:
if(strcmp(cmd, "/changename", true) == 0)
    {
      GetPlayerName(playerid, sendername, sizeof(sendername));
        new tmpp[256];
        tmpp = strtok(cmdtext, idx);
        if(!strlen(tmpp))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /changename [playerid] [new_nick]");
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Remember to ban/delete old Firstname_Lastname from 'accounts' folder!!");
            return 1;
        }
        giveplayerid = strval(tmpp);
        tmp = strtok(cmdtext, idx);
        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
        GetPlayerName(playerid, sendername, sizeof(sendername));
        if(IsPlayerConnected(playerid))
        {
          if(PlayerInfo[playerid][pAdmin] >= 1337)
          {
            if(IsPlayerConnected(giveplayerid))
            {
                    SetPlayerName(giveplayerid, tmp);
                    format(string, sizeof(string), "[SERVER]: %s(%i) has changed Your name to %s", sendername, playerid, tmp);
                    SendClientMessage(giveplayerid, COLOR_GREEN, string);
                    format(string, sizeof(string), "[SERVER]: You have changed ID %i's name to %s", giveplayerid, tmp);
                    SendClientMessage(playerid, COLOR_GREEN, string);
                    format(string, sizeof(string), "[SERVER]: Remember to ban/delete %s's old Firstname_Lastname!", tmp);
                    SendClientMessage(playerid, COLOR_LIGHTRED, string);
                    format(string, 256, "[SERVER]: %s has changed %s's his name to %s.", sendername,giveplayer, tmp);
                    ABroadCast(COLOR_RED,string,1);
                }
                else
                {
                  format(string, sizeof(string), "%d is not an active player.", giveplayerid);
                    SendClientMessage(playerid, COLOR_GREY, string);
                }
            }
            else
            {
              SendClientMessage(playerid, COLOR_GREY, "You do not have permission to use that command!");
            }
        }
        else
        {
          SendClientMessage(playerid, COLOR_GREY, "You Must be logged in to use this command!");
        }
        return 1;
    }
What could possible be wrong?