[Off] Ayuda con un comando
#1

Hey gente estoy intentando hacer un comando para poder reparar los vehiculos, pero me lanza un error en el float y no se como arreglarlo, alguien me dice que debo hacer?

Error:
Код:
C:\Users\TheMatius\Desktop\Servidor\gamemodes\VortexRoleplay.pwn(26772) : warning 213: tag mismatch
C:\Users\TheMatius\Desktop\Servidor\gamemodes\VortexRoleplay.pwn(26773) : warning 213: tag mismatch
C:\Users\TheMatius\Desktop\Servidor\gamemodes\VortexRoleplay.pwn(26789) : warning 213: tag mismatch
C:\Users\TheMatius\Desktop\Servidor\gamemodes\VortexRoleplay.pwn(26790) : warning 213: tag mismatch
C:\Users\TheMatius\Desktop\Servidor\gamemodes\VortexRoleplay.pwn(26806) : warning 213: tag mismatch
C:\Users\TheMatius\Desktop\Servidor\gamemodes\VortexRoleplay.pwn(26807) : warning 213: tag mismatch
Comando:
Код:
command(repararveh, playerid, params[])
{
	new id, string[128], vehid;
	if(sscanf(params, "ud", id, vehid))
	{
	    if(Player[playerid][AdminLevel] >= 3)
	    {
	    	SendClientMessage(playerid, WHITE, "USAR: /repararveh [jugadorid][casilla (1-3)]");
	    }
	}
	else
	{
		if(Player[playerid][AdminLevel] >= 3)
		{
			switch(vehid)
			{
				case 1:
				{
				    new veh = GetPlayerVehicleID(id), float:health;
			            GetVehicleHealth(veh, health);
				    if(health < 1000)
					{
			  			RepairVehicle(GetPlayerVehicleID(id));
				 		format(string, sizeof(string), "Has reparado el vehiculo de %s", GetName(id));
				 		SendClientMessage(playerid, WHITE, string);
				 		format(string, sizeof(string), "%s ha reparado tu vehiculo", GetName(playerid));
				 		SendClientMessage(playerid, WHITE, string);
					}
					else
					{
		    			SendClientMessage(playerid, WHITE, "Este vehiculo no necesita reparaciуn");
					}
				}
				case 2:
				{
				    new veh = GetPlayerVehicleID(id), float:health;
			    	    GetVehicleHealth(veh, health);
				    if(health < 1000)
					{
			  			RepairVehicle(GetPlayerVehicleID(id));
				 		format(string, sizeof(string), "Has reparado el vehiculo de %s", GetName(id));
				 		SendClientMessage(playerid, WHITE, string);
				 		format(string, sizeof(string), "%s ha reparado tu vehiculo", GetName(playerid));
				 		SendClientMessage(playerid, WHITE, string);
					}
					else
					{
		    			SendClientMessage(playerid, WHITE, "Este vehiculo no necesita reparaciуn");
					}
				}
				case 3:
				{
				    new veh = GetPlayerVehicleID(id), float:health;
				    GetVehicleHealth(veh, health);
				    if(health < 1000)
					{
			  			RepairVehicle(GetPlayerVehicleID(id));
				 		format(string, sizeof(string), "Has reparado el vehiculo de %s", GetName(id));
				 		SendClientMessage(playerid, WHITE, string);
				 		format(string, sizeof(string), "%s ha reparado tu vehiculo", GetName(playerid));
				 		SendClientMessage(playerid, WHITE, string);
					}
					else
					{
		    			SendClientMessage(playerid, WHITE, "Este vehiculo no necesita reparaciуn");
					}
				}
				default:
				{
				    SendClientMessage(playerid, WHITE, "Las unicas casillas disponibles del vehiculo son de 1-3");
				}
			}
		    
		}
	    
	}
	return 1;
}
Reply
#2

pon la letra inicial de la etiqueta en mayъscula, cambia "float:" por "Float:"
Reply
#3

Oh, no vi eso xd muchas gracias
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)