28.01.2012, 03:03
This doesn't load:
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
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);
}
"LoadFaction();" is under OnGameModeInIt