Couple of Errors
#2

I did it

pawn Код:
public LoadIRC()
{
    new arrCoords[5][64];
    new strFromFile2[256];
    new File: file = fopen("channels.cfg", io_read);
    if (file)
    {
        new idx;
        while (idx < sizeof(IRCInfo)) // This is 7896
        {
            fread(file, strFromFile2);
            split(strFromFile2, arrCoords, '|');
            strmid(IRCInfo[idx][iAdmin], arrCoords[0], 0, strlen(arrCoords[0]), 255);
            strmid(IRCInfo[idx][iMOTD], arrCoords[1], 0, strlen(arrCoords[1]), 255);
            strmid(IRCInfo[idx][iPassword], arrCoords[2], 0, strlen(arrCoords[2]), 255);
            IRCInfo[idx][iNeedPass] = strval(arrCoords[3]);
            IRCInfo[idx][iLock] = strval(arrCoords[4]);
            printf("IRC:%d Admin:%s MOTD: %s Passwort: %s NeedPass: %d Lock: %d",idx,IRCInfo[idx][iAdmin],IRCInfo[idx][iMOTD],IRCInfo[idx][iPassword],IRCInfo[idx][iNeedPass],IRCInfo[idx][iLock]);
            idx++;
        }
        fclose(file);
    }
    return 1;
}
I hope that i have helped
Reply


Messages In This Thread
Couple of Errors - by sapsap - 06.03.2011, 10:52
Re: Couple of Errors - by rjjj - 06.03.2011, 10:59
Re: Couple of Errors - by sapsap - 06.03.2011, 11:01
Re: Couple of Errors - by rjjj - 06.03.2011, 11:07
Re: Couple of Errors - by sapsap - 06.03.2011, 11:16

Forum Jump:


Users browsing this thread: 1 Guest(s)