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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: warning 202: number of arguments does not match definition (/showthread.php?tid=81593)



warning 202: number of arguments does not match definition - Agent Smith - 12.06.2009

Код:
			{
  					AdministratorMessage(COLOR_YELLOW, string);
			}
Some reason it gives me a warning, Anyone can help me?


Re: warning 202: number of arguments does not match definition - JoeDaDude - 12.06.2009

Is it defined?
Is it a valid code,
Please provide a error or bit more code


Re: warning 202: number of arguments does not match definition - Agent Smith - 12.06.2009

Код:
	if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    new sendername[MAX_PLAYER_NAME];
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GREY, "[USAGE] (/a)dmin [admin chat]");
				return 1;
			}

			new arank[64];
			if(PlayerInfo[playerid][pAdmin] == 1) { arank = "Trial Admin"; }
			else if(PlayerInfo[playerid][pAdmin] == 2) { arank = "RP Admin"; }
			else if(PlayerInfo[playerid][pAdmin] == 3) { arank = "Game Admin"; }
			else if(PlayerInfo[playerid][pAdmin] == 19) { arank = "Lead Admin"; }
			else if(PlayerInfo[playerid][pAdmin] == 20) { arank = "Community Owner"; }
			else if(PlayerInfo[playerid][pAdmin] == 1337) { arank = "Hidden Lead Admin"; }
			else if(PlayerInfo[playerid][pAdmin] == 1338) { arank = "Community Owner"; }
			else { arank = "Unknown Admin Rank"; }

			format(string, sizeof(string), "*%s %s: %s", arank, sendername, result);
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
  					AdministratorMessage(COLOR_YELLOW, string);  // Error line
			}
			printf("Admin %s: %s", sendername, result);
		}
		return 1;
	}
This is the whole command.