Loading With Y_INI
#1

This doesn't load:

pawn Код:
enum FactionData
{
    fName[128],
    fType
   
};

new FactionInfo[20][FactionData], Total_Faction_Created;
pawn Код:
public LoadFactions(factionid,name[],value[])
{
        INI_String("fName",FactionInfo[factionid][fName],128);
        INI_Int("fType",FactionInfo[factionid][fType]);
        return 1;
}
stock LoadFaction()
{
    Total_Faction_Created = 1;
    for(new i = 1;i<MAX_FACTIONS;i++)
        {
            new file[64];format(file,sizeof file,FACTION_PATH,i);
            if(fexist(file))
            {
                    new INI:handler = INI_Open(file);
                    INI_ParseFile(file,"LoadFactions",.bExtra = true, .extra = i);
                    printf("%s %d", FactionInfo[i][fName], FactionInfo[i][fType]);
                    INI_Close(handler);
                   
                    Total_Faction_Created++;
                   
            }
        }

    printf("%i faction(s) loaded.",Total_Faction_Created);
}
The printf shows: "blank 0" Blank as in literally nothing there, and the 0 is the "%d" yet it's set as 2 and 1, but shows up at 0, meaning it's not loading.

"LoadFaction();" is under OnGameModeInIt
Reply


Messages In This Thread
Loading With Y_INI - by Genuine Life Roleplay - 28.01.2012, 03:03

Forum Jump:


Users browsing this thread: 1 Guest(s)