How to use argument {Float,_}... in function?
#4

I believe in that case what you are looking for is just the ..., as the stuff within the curly brackets defines a tag type to allow. You need only use the ... for integers:

pawn Код:
FileGet(Filename[], const Format[], ...)
{
    if(!fexist(Filename)) return 0;
    new File:Handle = fopen(Filename,io_read);
    new String[150];
    fread(Handle,String);
    for(new X = 1; X < numargs(); X++)
    {
        new Arguments = getarg(X);
        sscanf(String, Format, Arguments);
    }
    fclose(Handle);
    return 1;
}
Reply


Messages In This Thread
How to use argument {Float,_}... in function? - by Prosettur - 26.06.2012, 03:57
Re: How to use argument {Float,_}... in function? - by JaTochNietDan - 26.06.2012, 04:01
Re: How to use argument {Float,_}... in function? - by Prosettur - 26.06.2012, 04:12
Re: How to use argument {Float,_}... in function? - by JaTochNietDan - 26.06.2012, 04:16

Forum Jump:


Users browsing this thread: 1 Guest(s)