SA-MP Forums Archive
[Off] Ayuda con un comando - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Off] Ayuda con un comando (/showthread.php?tid=559696)



Ayuda con un comando - TheMatius - 24.01.2015

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;
}



Respuesta: Ayuda con un comando - Zume - 24.01.2015

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


Respuesta: Ayuda con un comando - TheMatius - 24.01.2015

Oh, no vi eso xd muchas gracias