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=572453)



warning 202: number of arguments does not match definition - Moroccan - 28.04.2015

Hello All How to Fix this Warning

Lines
Код:
//===============================PICKUP DEKAT SPAWN SF BASEBALL=================
    if(pickupid == rules) {
    	return cmd_rules(playerid);
    }
    if(pickupid == help) {
    	return cmd_help(playerid);
	}
	return 1;
}



Re: warning 202: number of arguments does not match definition - fuckingcruse - 28.04.2015

If and if ..?

If there are 3 or more different divisons , then seprate rest with else if and the last one with else..

So change the 2nd if with else


Re: warning 202: number of arguments does not match definition - iZN - 28.04.2015

I'm not sure what could be wrong since you haven't posted your full related code, but I'd suggest using a switch() statement, instead of if-else statement here.

pawn Код:
switch(pickupid)
{
    case rules: cmd_rules(playerid);
    case help: cmd_help(playerid);
    case ...: // continue
}



AW: warning 202: number of arguments does not match definition - Nero_3D - 28.04.2015

It should look like that, same for cmd_help
pawn Код:
cmd_rules(playerid, "");



Re: warning 202: number of arguments does not match definition - Moroccan - 28.04.2015

Thank you Mr Nero_3D its working +REP