SA-MP Forums Archive
Dini_get problem. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dini_get problem. (/showthread.php?tid=401027)



Dini_get problem. - justinnater - 21.12.2012

Hey,

can someone please help me with this small issue I am having?
I have this line in my script:
Код:
if(strcmp(dini_Get(nomefile,"member%d",MAX_MEMBERS),"None",true)==0)
But it says "warning 202: number of arguments does not match definition", so does anyone knows where i should place the MAX_MEMBERS or anything?

Thanks in advance!


Re: Dini_get problem. - LarzI - 21.12.2012

Are you looking for something like this?
pawn Код:
for( new i = 0; i < MAX_MEMBERS; i ++ )
{
    new str[ 128 ];
    format( str, sizeof( str ), "member%i", i );
    if( !strcmp( dini_Get( nomefile, str ), "None", true ))
    {
        //stuff
    }
}



Re: Dini_get problem. - justinnater - 21.12.2012

Thanks mate, I've got it all working now.


Re: Dini_get problem. - LarzI - 21.12.2012

Quote:
Originally Posted by justinnater
Посмотреть сообщение
Thanks mate, I've got it all working now.
No problem