Tag mismatch
#1

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
Reply
#2

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


Forum Jump:


Users browsing this thread: 1 Guest(s)