Retriving all Arguments (Using: {Float,_}... )
#3

First of all you need an array to store the information, an enum is just a enumeration of constants
pawn Код:
enum TestFunc
{
    Name[32],
    PlotType = 0,
    Float: pPos[16]
}
new Array[TestFunc];

stock TestFunc(Name[], Plot = 0, {Float,_}:...) {
    if(numargs() == 2) {
        printf("Unable to add the runway plot as no points where given");
    } else {
        strcat((Array[Name][0] = EOS, Array[Name]), Name, 32);

        Array[PlotType] = Plot;

        new
            paramPos = 2,
            paramCount = numargs()
        ;
        while(paramPos < paramCount) {
            Array[paramPos - 2] = getarg(paramPos);
        }
    }
}
Reply


Messages In This Thread
Retriving all Arguments (Using: {Float,_}... ) - by zT KiNgKoNg - 24.10.2014, 21:00
Re: Retriving all Arguments (Using: {Float,_}... ) - by zT KiNgKoNg - 25.10.2014, 09:31
AW: Retriving all Arguments (Using: {Float,_}... ) - by Nero_3D - 25.10.2014, 10:10
Re: Retriving all Arguments (Using: {Float,_}... ) - by zT KiNgKoNg - 25.10.2014, 10:11

Forum Jump:


Users browsing this thread: 2 Guest(s)