Warning 213: Tag Mismatch
#1

Hello, i can't figure out what's the problem and i'm getting tag mismatch on this code:

Код:
// derby
	if(strcmp(cmd, "/derby", true) == 0)
	{
	    if (IsPlayerConnected(playerid))
	    {
	        if (PlayerInfo[playerid][pAdmin] < 4)
	        {
	            SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized!!!");
	            return 1;
	        }
			tmp = strtok(cmdtext,idx);
			if (!strlen(tmp))
			{
			    SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /derby fee|prepare|start|finish|goto");
			    return 1;
			}
			// derby goto
			if (strcmp(tmp, "goto", true) == 0)
			{
		        SetPlayerPos(playerid, -2029.7095, -121.5312, 35.1810);
		        SetPlayerFacingAngle(playerid, 180);
		        SetPlayerInterior(playerid, 0);
				SendClientMessage(playerid, COLOR_GRAD4, "You have been teleported to the Derby place.");
				return 1;
			}
			// derby fee
			if (strcmp(tmp, "fee", true) == 0)
			{
				tmp = strtok(cmdtext,idx);
				if (!strlen(tmp))
				{
				    SendClientMessage(playerid, COLOR_GRAD1, "USAFE: /derby fee [entranceFee]");
				    return 1;
				}
				new tmpfee = strval(tmp);
				if (tmpfee < 1 || tmpfee > 5000)
				{
				    SendClientMessage(playerid, COLOR_GRAD1, "Derby entrance fee must be between 1 and 5000");
				    return 1;
				}
				DerbyFee = tmpfee;
				format(string, sizeof (string), "Derby entrance fee has been set to %d", DerbyFee);
			    SendClientMessage(playerid, COLOR_GRAD4, string);
			    return 1;
			}
			// derby prepare
			if (strcmp(tmp, "prepare", true) == 0)
			{
			    if (DerbyStarted > 0)
			    {
			        SendClientMessage(playerid, COLOR_GRAD1, "A Derby is already started. You must /derby finish first");
			        return 1;
			    }
			    SendClientMessageToAll(TEAM_ORANGE_COLOR, "Destruction Derby is about to start, type /joinderby and you'll be teleported");
			    MoveObject(derbygate, -2046.60595, -117.4, 29.75471, 3);
			    DerbyStarted = 1;
			    DerbyPrize = 0;
			    return 1;
			}
			// derby start
			if (strcmp(tmp, "start", true)==0)
			{
			    if (DerbyStarted != 1)
			    {
			        SendClientMessage(playerid, COLOR_GRAD1, "There is no Derby prepared yet. Use /derby prepare");
			        return 1;
			    }
			    MoveObject(derbygate, -2046.60595, -117.4, 34, 3);
			    DerbyStarted = 2;
			    SendClientMessageToAll(COLOR_WHITE, "A Derby has started. Don't leave your car until it finishes!");
			    return 1;
			}
			// derby finish
			if (strcmp(tmp, "finish", true)==0)
			{
			    if (DerbyStarted != 2)
			    {
			        SendClientMessage(playerid, COLOR_GRAD1, "You can't finish a Derby that didn't /derby start yet");
			        return 1;
			    }
			    DerbyStarted = 0;
			    new DerbyWinner = 255;
			    new derbyhealth = 0;
			    new carssurvived = 0;
			    new tmphealth;
			    new derbyid;
			    for (i=0; i<MAX_PLAYERS; i++)
			    {
			        if (DerbyPlayers[i] == 1)
			        {
						derbyid = GetPlayerVehicleID(i);
						if (IsPlayerConnected(i) && IsPlayerInAnyVehicle(playerid) && GetVehicleModel(derbyid) == 504)
						{
						    carssurvived++;
						    GetVehicleHealth(derbyid, tmphealth);
						    if (tmphealth > derbyhealth) == This line i'm getting warning, tag mismatch.
						    {
						        derbyhealth = tmphealth;
						        DerbyWinner = i;
						    }
						}
			        }
			    }
			    format(string, sizeof(string), "A Derby has finished. %d cars survived.", carssurvived);
			    SendClientMessageToAll(TEAM_ORANGE_COLOR, string);
			    if (DerbyWinner != 255)
			    {
				    GetPlayerName(DerbyWinner, playername, sizeof(playername));
				    format(string, sizeof(string), "Our winner is %s, who is getting $%d.", playername, DerbyPrize);
				    SafeGivePlayerMoney(DerbyWinner, DerbyPrize);
			    }
			    else
			    {
			        format(string, sizeof(string), "No one survived in current Destruction Derby.");
			    }
			    SendClientMessageToAll(TEAM_ORANGE_COLOR, string);
			    return 1;
			}
	    }
	}
Reply
#2

Which line is it ?
Reply
#3

Oh found the problem, nevermind. Admin/mod can delete the thread!
Reply
#4

Okay. Glad you fixed it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)