Unknown Gamemode
#1

Hello there, I'm facing a proplem with my gamemode, In my server it SAVES chars and others every 30 minute, Everytime it saves the businesses the gamemode crash, like any command we type it be UNKNOWN COMMAND. and anyone wants to login he cant such that..

Here is the SaveBusiness

pawn Код:
stock SaveBusiness()
{
    if(!fexist("business.cfg")) fcreate("business.cfg");
    new idx = 1, File:file;
    new string[128], string1[256];
    while(idx < MAX_BIZ)
    {
        format(string1, sizeof(string1), "%d|%d|%s|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|", BizInfo[idx][bType], BizInfo[idx][bStatus], BizInfo[idx][bOwner], BizInfo[idx][bX], BizInfo[idx][bY], BizInfo[idx][bZ], BizInfo[idx][bMoney], BizInfo[idx][bProducts], BizInfo[idx][bSold], BizInfo[idx][bLevel], BizInfo[idx][bPrice], BizInfo[idx][bAP], BizInfo[idx][bCellphone], BizInfo[idx][bPhonebook], BizInfo[idx][bDice], BizInfo[idx][bCigar], BizInfo[idx][bSprunk], BizInfo[idx][bSpraycan]);
        strcat(string, string1, sizeof(string1));
        format(string1, sizeof(string1), "%d|%d|%d|%d|%d|%d|%d|%d|%d|%s\r\n", BizInfo[idx][bRope], BizInfo[idx][bMask], BizInfo[idx][bBlindfold], BizInfo[idx][bWalkietalkie], BizInfo[idx][bMP3], BizInfo[idx][bCamera], BizInfo[idx][bGascan], BizInfo[idx][bBoombox], BizInfo[idx][bSpeedo], BizInfo[idx][bMessage]);
        strcat(string, string1, sizeof(string1));
        if(idx == 1)
        {
            file = fopen("business.cfg", io_write);
        }
        else
        {
            file = fopen("business.cfg", io_append);
        }
        fwrite(file, string);
        fclose(file);
        idx++;
    }
    print("Businesses saved successfully.");
}
Sorry for my bad English.
Reply


Messages In This Thread
Unknown Gamemode - by Zamora - 04.01.2016, 14:12
Re: Unknown Gamemode - by Zamora - 04.01.2016, 15:44
Re: Unknown Gamemode - by Stones - 04.01.2016, 16:40

Forum Jump:


Users browsing this thread: 2 Guest(s)