09.09.2013, 14:01
Fixed it, added this:
However, the files are created, but the int isn't written now...
'Inting' happens here:
pawn Код:
stock LoadRaceRecords()
{
for(new x; x<currentraceslot; x++)
{
new file[64],RaceName[100];
format(RaceName, 100, "%s", RaceInfo[x][racename]);
format(file,sizeof file,"Races/%s.ini",RaceName);
INI_Open(file);
RaceInfo[x][record] = INI_ReadInt("Record");
INI_Save();
INI_Close();
}
return 1;
}
'Inting' happens here:
pawn Код:
new country = CreateRace("Country", 160000, 600); //OnGameModeInit
pawn Код:
stock CreateRace(RaceName[], Prize, RaceTimeout, RaceVehicle = -1)
{
format(RaceInfo[currentraceslot][racename], 100, "%s", RaceName);
//RaceInfo[currentraceslot][prize] = Prize;
RaceInfo[currentraceslot][record] = RaceTimeout;
//RaceInfo[currentraceslot][racetimeout] = RaceTimeout;
//RaceInfo[currentraceslot][racevehicle] = RaceVehicle;
//RaceInfo[currentraceslot][racerunning] = false;
//RaceInfo[currentraceslot][racejoinable] = false;
return currentraceslot, currentraceslot ++;
}