[HELP] argument type mismatch (argument 2)
#1

Hello again, I'm working on a /setwanted command, and I get the error:

Код:
argument type mismatch (argument 2)
at:

Код:
level = SetPlayerWantedLevel(playerid, tmp);
Here is the Command:

Код:
if(strcmp(cmd, "/setwanted", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GREY, "	USAGE: /setwanted [playerid] [level 1-6]");
				return 1;
			}
			new para1;
			new level;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = SetPlayerWantedLevel(playerid, tmp);
			if(level > 6 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "Dont go below number 0, or above number 6."); return 1; }
			if(gTeam[playerid] == TEAM_LSPD)
			{
			  if(PlayerInfo[playerid][pLAERank] >= 4)
			  {
					if(IsPlayerConnected(para1))
				  {
				    if(para1 != INVALID_PLAYER_ID)
				    {
							GetPlayerName(para1, giveplayer, sizeof(giveplayer));
							GetPlayerName(playerid, sendername, sizeof(sendername));
							format(string, sizeof(string), "%s has set your wanted level to %d.", sendername, level);
							SendClientMessage(para1, COLOR_BLUE, string);
							format(string, sizeof(string), "You have set %s wanted level to %d.", giveplayer,level);
							SendClientMessage(playerid, COLOR_BLUE, string);
							format(string, sizeof(string), "Dispatch: All units, %s is now wanted level %d, use caution, over. **", sendername, level);
							SendRadioMessage(9, COLOR_BLUE, string);
						}
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GREY, "	Identification Error - You need LAE rank 4 to do this.");
					return 1;
				}
			}
			else
			{
			  SendClientMessage(playerid, COLOR_GREY, "	Identification Error - You are not a Police Officer.");
			  return 1;
			}
		}
		return 1;
	}
Thanks for the help

Reply


Messages In This Thread
[HELP] argument type mismatch (argument 2) - by FreddeN - 11.03.2010, 17:01
Re: [HELP] argument type mismatch (argument 2) - by lameguy - 11.03.2010, 17:20

Forum Jump:


Users browsing this thread: 2 Guest(s)