Problem with "stock SaveRaceRecords()"
#3

Fixed it, added this:
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;
}
However, the files are created, but the int isn't written now...

'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 ++;
}
Reply


Messages In This Thread
Problem with "stock SaveRaceRecords()" - by knackworst - 09.09.2013, 13:49
Re: Problem with "stock SaveRaceRecords()" - by Weponz - 09.09.2013, 13:57
Re: Problem with "stock SaveRaceRecords()" - by knackworst - 09.09.2013, 14:01
Re: Problem with "stock SaveRaceRecords()" - by knackworst - 09.09.2013, 14:35

Forum Jump:


Users browsing this thread: 1 Guest(s)