FactionType and FactionSlot resetting
#1

Hi, the FactionType keep resetting after LoadFactions() is called, what is the problem?

pawn Код:
LoadFactions()
{
    new arrCoords[12][64];
    new strFromFile2[512];
    new File: file = fopen("Configs/factions.cfg", io_read);
    if(file)
    {
        new idx;
        while (idx < sizeof(FactionInfo))
        {
            fread(file, strFromFile2);
            split(strFromFile2, arrCoords, '|');
            strmid(FactionInfo[idx][FactionName], arrCoords[0], 0, strlen(arrCoords[0]), 255);
            strmid(FactionInfo[idx][FactionMOTD], arrCoords[1], 0, strlen(arrCoords[1]), 255);
            strmid(FactionInfo[idx][FactionLeader], arrCoords[2], 0, strlen(arrCoords[2]), 255);
            strmid(FactionInfo[idx][FactionRank1], arrCoords[3], 0, strlen(arrCoords[3]), 255);
            strmid(FactionInfo[idx][FactionRank2], arrCoords[4], 0, strlen(arrCoords[4]), 255);
            strmid(FactionInfo[idx][FactionRank3], arrCoords[5], 0, strlen(arrCoords[5]), 255);
            strmid(FactionInfo[idx][FactionRank4], arrCoords[6], 0, strlen(arrCoords[6]), 255);
            strmid(FactionInfo[idx][FactionRank5], arrCoords[7], 0, strlen(arrCoords[7]), 255);
            strmid(FactionInfo[idx][FactionRank6], arrCoords[8], 0, strlen(arrCoords[8]), 255);
            FactionInfo[idx][FactionType] = strval(arrCoords[10]);//This is the error
            FactionInfo[idx][FactionSlot] = strval(arrCoords[11]);
            printf("[Dynamic Faction] Faction Name: %s, Type: %d, Slot: %d, ID: %d",FactionInfo[idx][FactionName],FactionInfo[idx][FactionType],FactionInfo[idx][FactionSlot],idx);
            idx++;
        }
        fclose(file);
    }
    return 1;
}
Reply


Messages In This Thread
FactionType and FactionSlot resetting - by seanny - 16.04.2012, 14:10
Re: FactionType and FactionSlot resetting - by AndreT - 16.04.2012, 14:14
Re: FactionType and FactionSlot resetting - by seanny - 16.04.2012, 14:29
Re: FactionType and FactionSlot resetting - by AndreT - 16.04.2012, 15:09
Re: FactionType and FactionSlot resetting - by seanny - 16.04.2012, 17:29

Forum Jump:


Users browsing this thread: 1 Guest(s)