SA-MP Forums Archive
Tag mismatch - 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: Tag mismatch (/showthread.php?tid=662441)



Tag mismatch - AhmedMohamed - 01.01.2019

I got a warning with that method.
Actually it's the first time I use this method so maybe wrong usage?

Код:
if(IsPlayerInAnyVehicle(i) && Player[i][Speedo] == 1)
	    	{
				new string[50], color1[4], health, color2[4], vehid=GetPlayerVehicleID(i);

     	35906---------->GetVehicleHealth(vehid, health);
				switch(GetPlayerSpeed(i, 0))
				{
				    case 0 .. 40: color1 = "~w~";
				    case 41 .. 60: color1 = "~y~";
				    case 61 .. 200: color1 = "~r~";
				    default: color1 = "~w~";
				}
				switch(health)
				{
				    case 0 .. 10: color2 = "~r~";
				    case 11 .. 50: color2 = "~y~";
				    case 51 .. 70: color2 = "~w~";
				    case 71 .. 100: color2 = "~g~";
				    default: color2 = "~w~";
				}
				
				format(string, sizeof(string), "~b~Car Health: %s%d", color2, health);
				PlayerTextDrawSetString(i, CHTextDraw[i], string);
				
				format(string, sizeof(string), "~b~MPH: %s%d", color1, GetPlayerSpeed(i, 0));
				PlayerTextDrawSetString(i, SpeedTextDraw[i], string);
			}
Warnings:
Код:
Elites Roleplay\gamemodes\HS-RP.pwn(35906) : warning 213: tag mismatch



Re: Tag mismatch - AhmedMohamed - 01.01.2019

Solved!
Код:
new string[50], color1[4], Float:health, color2[4], vehid=GetPlayerVehicleID(i);