26.02.2016, 15:52
Hi. I'm trying to get my faction ini files to load when I start my gamemode, but when I add the function anywhere in my script, pawno fails to compile and gives me 26 errors. Could anyone help me see what's wrong?
OnGameModeInit
Stock
I've tried placing LoadFactions(); to work as a command aswell but the same problem occurred.
OnGameModeInit
Код:
LoadFactions();
Код:
stock LoadFactions(){ new Factionfile[128]; for(new i=1; i<MAX_FACTIONS; i++){ format(Factionfile, sizeof(Factionfile), "factions/%d.ini", i); new INI:File = INI_Open(Factionfile); INI_String("Faction Name",FactionInfo[i][fName], 128); INI_Int("Faction Type",FactionInfo[i][fType]); INI_Int("Total Members",FactionInfo[i][fMembers]); INI_Close(); } }