stock crashing my server
#2

pawn Код:
stock GiveCellNumber(playerid)
{
    new
        number,
        File:hFile,
        string[128];
    if (IsPlayerConnectedAndLoggedIn(playerid))
    {
        while (true)
        {
            number = random(899999) + 100000;
            format(string, sizeof(string), "XRPG/Numbers/%s.ini", number);
            if (!fexist(string))
            {
                hFile = fopen(string, io_readwrite);
                PlayerInfo[playerid][pMyNumber] = number;
                fwrite(hFile, PlayerName[playerid]);
                fclose(hFile);
                break;
            }
        }
    }
    return 1;
}
You were trying to append a string to a nonexistent file.
Reply


Messages In This Thread
stock crashing my server - by Whizion - 03.10.2010, 02:09
Re: stock crashing my server - by bigcomfycouch - 03.10.2010, 02:22
Re: stock crashing my server - by Whizion - 03.10.2010, 20:41
Re: stock crashing my server - by Conroy - 03.10.2010, 20:45
Re: stock crashing my server - by bigcomfycouch - 03.10.2010, 20:48

Forum Jump:


Users browsing this thread: 1 Guest(s)