Getting errors from a function
#5

This isn't a dynamic race system. It just runs a single race at a time.

LoadRaceNames function -
pawn Код:
function LoadRaceNames()
{
    new
        rNameFile[64],
        string[64]
    ;
    format(rNameFile, sizeof(rNameFile), "/RaceNames/RaceNames.txt");
    TotalRaces = dini_Int(rNameFile, "TotalRaces");
    Loop(x, TotalRaces)
    {
        format(string, sizeof(string), "Race_%d", x), strmid(RaceNames[x], dini_Get(rNameFile, string), 0, 20, sizeof(RaceNames));
        printf(">> Loaded Races: %s", RaceNames[x]);
    }
    return 1;
}
There isn't a stock / function for "random(TotalRaces)". / TotalRaces
Reply


Messages In This Thread
Getting errors from a function - by biker122 - 04.04.2014, 15:01
Re: Getting errors from a function - by biker122 - 04.04.2014, 15:36
Re: Getting errors from a function - by Lidor124 - 04.04.2014, 15:36
Re: Getting errors from a function - by Konstantinos - 04.04.2014, 15:38
Re: Getting errors from a function - by biker122 - 04.04.2014, 15:44
Re: Getting errors from a function - by Konstantinos - 04.04.2014, 15:47

Forum Jump:


Users browsing this thread: 1 Guest(s)