Help - Debug
#3

the server crashes, not realy the players, at first I thought it was my dedi wich was beeing rebooted every 20 min but since I tried anotehr another gamemode lolz it's mine where the prob is

and wow, never thought of that! I'm gonna check things out right away, thnx for your quick respons allready

Pls don't let this stop anyone from posting more answers like this

Grts Riz

EDIT:

Found something that doesn't create any files, could that cause a crash (or 2? )

this is the code...

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid])
        {
            new string3[32];
            new pname3[MAX_PLAYER_NAME];
            GetPlayerName(playerid, pname3, sizeof(pname3));
            format(string3, sizeof(string3), "%s.cer", pname3);
            new File: pFile = fopen(string3, io_write);
            if (pFile)
            {
                new var[32];
                format(var, 32, "%s\n", PlayerInfo[playerid][pPassword]);fwrite(pFile, var);
                fclose(pFile);
                new File: hFile = fopen(string3, io_append);
                PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
                format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
                format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
                format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
                format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pBank]);fwrite(hFile, var);
                fclose(hFile);
            }
        }
    }
    return 1;
}
I didn't find any files with a .cer extension so I'm thinking this ain't working. In the mean time I'll leave if out and test my server again

Again, pls don't let this stop anyone with helpfull repons.

Grts Riz
Reply


Messages In This Thread
Help - Debug - by Rizard - 21.09.2009, 07:52
Re: Help - Debug - by Mikep. - 21.09.2009, 08:11
Re: Help - Debug - by Rizard - 21.09.2009, 08:30
Re: Help - Debug - by ev0lution - 21.09.2009, 09:03
Re: Help - Debug - by Rizard - 21.09.2009, 09:15

Forum Jump:


Users browsing this thread: 1 Guest(s)