SA-MP Forums Archive
warning 202: number of arguments does not match definition - 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: warning 202: number of arguments does not match definition (/showthread.php?tid=402130)



warning 202: number of arguments does not match definition - Patrick - 25.12.2012

pawn Код:
dcmd(admins,6,cmdtext);
    dcmd(changepass,10,cmdtext);
    dcmd(login,5,cmdtext);
    dcmd(stats,5,cmdtext);
    dcmd(register,8,cmdtext);
    //--Admin Commands--//
    dcmd(vfix,5,cmdtext);
    dcmd(setlevel,8,cmdtext);
    dcmd(setmytime,9,cmdtext);
    dcmd(getid,5,cmdtext);
    dcmd(getping,7,cmdtext);
    dcmd(getid,5,cmdtext);
    dcmd(acmds,5,cmdtext);
    dcmd(mute,4,cmdtext);
    dcmd(unmute,6,cmdtext);
    dcmd(kick,4,cmdtext);
    dcmd(warn,4,cmdtext);
    dcmd(clearchat,9,cmdtext);
    dcmd(dontuseskin,11,cmdtext);
    dcmd(password,8,cmdtext);
    dcmd(ban,3,cmdtext);
    dcmd(unban,5,cmdtext);
    dcmd(announce,8,cmdtext);
    dcmd(goto,4,cmdtext);
    dcmd(acar,4,cmdtext);
    dcmd(spec,4,cmdtext);
    dcmd(get,3,cmdtext);
    dcmd(slap,4,cmdtext);
    dcmd(freeze,6,cmdtext);
    dcmd(unfreeze,8,cmdtext);
    dcmd(setscore,8,cmdtext);
    dcmd(sethealth,9,cmdtext);
    dcmd(setarmour,9,cmdtext);
    dcmd(setallarmour,12,cmdtext);
    dcmd(setallhealth,12,cmdtext);
    dcmd(specoff,7,cmdtext);
    dcmd(setcash,7,cmdtext);
    dcmd(settime,7,cmdtext);
    dcmd(useskin,7,cmdtext);
    dcmd(carcolor,9,cmdtext);
when i compile warning shows
pawn Код:
C:\Users\Subang\Desktop\Modern Warfare\gamemodes\MW.pwn(1020) : warning 202: number of arguments does not match definition
C:\Users\Subang\Desktop\Modern Warfare\gamemodes\MW.pwn(1020) : warning 202: number of arguments does not match definition
C:\Users\Subang\Desktop\Modern Warfare\gamemodes\MW.pwn(1022) : warning 202: number of arguments does not match definition
C:\Users\Subang\Desktop\Modern Warfare\gamemodes\MW.pwn(1022) : warning 202: number of arguments does not match definition
C:\Users\Subang\Desktop\Modern Warfare\gamemodes\MW.pwn(1024) : warning 202: number of arguments does not match definition
C:\Users\Subang\Desktop\Modern Warfare\gamemodes\MW.pwn(1024) : warning 202: number of arguments does not match definition
C:\Users\Subang\Desktop\Modern Warfare\gamemodes\MW.pwn(1026) : warning 202: number of arguments does not match definition
C:\Users\Subang\Desktop\Modern Warfare\gamemodes\MW.pwn(1026) : warning 202: number of arguments does not match definition
C:\Users\Subang\Desktop\Modern Warfare\gamemodes\MW.pwn(1032) : warning 202: number of arguments does not match definition
C:\Users\Subang\Desktop\Modern Warfare\gamemodes\MW.pwn(1032) : warning 202: number of arguments does not match definition
C:\Users\Subang\Desktop\Modern Warfare\gamemodes\MW.pwn(1037) : warning 202: number of arguments does not match definition
C:\Users\Subang\Desktop\Modern Warfare\gamemodes\MW.pwn(1037) : warning 202: number of arguments does not match definition
C:\Users\Subang\Desktop\Modern Warfare\gamemodes\MW.pwn(1038) : warning 202: number of arguments does not match definition
C:\Users\Subang\Desktop\Modern Warfare\gamemodes\MW.pwn(1038) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


14 Warnings.
i tried to fix it but there is still 14 warnings, i dont know whats wrong, i did it right though or maybe i just did some error because its too many admin script


Re: warning 202: number of arguments does not match definition - Konstantinos - 25.12.2012

I'm not sure, but make sure it's defined correct.
pawn Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1



Re: warning 202: number of arguments does not match definition - Patrick - 25.12.2012

Quote:
Originally Posted by Dwane
Посмотреть сообщение
I'm not sure, but make sure it's defined correct.
pawn Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
yes its defined correct, i tried use yours but still give's same warning


Re: warning 202: number of arguments does not match definition - Konstantinos - 25.12.2012

It seems, that the parameters are not correct. It should be
pawn Код:
dcmd_admins(playerid, params[])
// etc.
And it the commands you're not using the params, just add this:
pawn Код:
#pragma unused params
I can't think anything else.


Re: warning 202: number of arguments does not match definition - Patrick - 25.12.2012

Thanks for help + rep .


Re: warning 202: number of arguments does not match definition - [CG]Milito - 25.12.2012

so, fixed? cause' I already saw some mistakes