stock crashing my server
#1

This is my stock:

pawn Код:
stock GiveCellNumber(playerid)
{
    new number;
    new string[128];
    new Infinity = 0;
    if(IsPlayerConnectedAndLoggedIn(playerid))
    {
        while(Infinity != 1)
        {
            number = random(899999) + 100000;
            format(string, sizeof(string), "XRPG/Numbers/%s.ini",number);
            if(!fexist(string)) // Check's if it's taken.
            {
                new File:hFile;
                hFile = fopen(string, io_append);
                fwrite(hFile, PlayerName[playerid]);
                PlayerInfo[playerid][pMyNumber] = number;
                fclose(hFile);
                return 1; // Stops the loop. (i think :X).
            }
        }
    }
    return 1;
}
It's supose to give you an unique cell phone number, but when ever i use it, my server crashes. (it turnes off).

Please help, thank you.
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)