07.03.2013, 14:57
Hello, I have some problems with y_ini even if I allready read the tutorial made by ******. I have also checked a few example on the forum but I can't get anything to load when using the parsefile function.
This is under OnGameModeInit and the printf is just there to tell me the MaxMember count to check if anything loads. It should be 30 as a default but it showms me 0.
For some reason it won't load
This is the actual function.
This is under OnGameModeInit and the printf is just there to tell me the MaxMember count to check if anything loads. It should be 30 as a default but it showms me 0.
Код:
new str[40]; for(new idx = 0; idx < sizeof(Factions); idx++) { format(str, sizeof(str), FPATH, idx); INI_ParseFile(str, "loadfactiondata_%s", .bExtra = true, .extra = idx ); printf("The membercount is %d", Factions[idx][fMaxMembers]); }
This is the actual function.
Код:
forward loadfactiondata(idx, name[], value[]); public loadfactiondata(idx, name[], value[]) { INI_String("Factionname", Factions[idx][fName],30); INI_Int("MaxMembers", Factions[idx][fMaxMembers]); return 1; }