I got big problem
#3

that makes sense. I have no idea why do I have new idx = 1, and then checking if idx == 1. Thanks, I will try it
EDIT: should I write it like this
pawn Код:
stock SaveBiz()
{
    if(!fexist("biz.cfg")) fcreate("biz.cfg");
    new idx = 1, File:file;
    new string[256];
    while(idx < MAX_BIZ)
    {
        format(string, sizeof(string), "%d|%d|%s|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%s\r\n", 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][bTake], BizInfo[idx][bName]);
        file = fopen("biz.cfg", io_write);
        fwrite(file, string);
        fclose(file);
        idx++;
    }
    print("Businesses saved successfully.");
}
I think that will write each time I save businesses another lines with the same things
Reply


Messages In This Thread
I got big problem - by dominik523 - 17.11.2013, 10:01
AW: I got big problem - by Skimmer - 17.11.2013, 10:07
Re: I got big problem - by dominik523 - 17.11.2013, 10:27
Re: I got big problem - by Wizzy951 - 17.11.2013, 10:43

Forum Jump:


Users browsing this thread: 1 Guest(s)