[Ajuda] Erro ao compilar.
#1

Fala ae galera eu arrumei 1 include, PPC_MissionsMedico, mas ela esta com erro ao compilar no gm, queria que me ajudassem descubrir qual e esse erro e conserta.

Код:
forward Medico_CheckPlayers(playerid);
public Medico_CheckPlayers(playerid)
{
	// Scan through all players
	for (new PlayerToCheck; PlayerToCheck < MAX_PLAYERS; PlayerToCheck++)
 {
		// check if this player is connected
		if (IsPlayerConnected(PlayerToCheck))
		{
			//Check if that player needs assistance
			if (PediuAjudaMedico[PlayerToCheck] == true)
			    SetPlayerMarkerForPlayer(playerid, PlayerToCheck, 0xFF0000FF); // Make that player red to the assistance-player
			else
   {
				// Reset the playercolor based on the player's class
			    switch (APlayerData[PlayerToCheck][PlayerClass])
			    {
			        case ClassTruckDriver: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassTruckDriver);
			        case ClassBusDriver: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassBusDriver);
			        case ClassPilot: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassPilot);
			        case ClassPolice: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassPolice);
			        case ClassMafia: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassMafia);
			        case ClassCourier: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassCourier);
			        case ClassAssistance: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassAssistance);
					case ClassMedico: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassMedico);
			    }
   }
  }
	}
}

// This function lets the assistance player repair and refuel another player's vehicle if he called for assistance
Medico_CurarPlayer(playerid)
{
	// Setup local variables
	new Float:vhealth, Float:FPayment, Payment, Float:x, Float:y, Float:z, Name[24], AssistName[24], Msg[128];

	// Get the assistance player's name
	GetPlayerName(playerid, AssistName, sizeof(AssistName));

	// Loop through all players
	for (new OtherPlayer; OtherPlayer < MAX_PLAYERS; OtherPlayer++)
	{
		// Check if this player is online
		if (IsPlayerConnected(OtherPlayer))
		{
			// Check if this player isn't the assistance player
			if (OtherPlayer != playerid)
			{
				// Check if this player needs assistance
				if (PediuAjudaMedico[OtherPlayer] == true)
				{
					GetPlayerPos(OtherPlayer, x, y, z);
					if (IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z))
					{
						PediuAjudaMedico[OtherPlayer] = false;
						GetPlayerName(OtherPlayer, Name, sizeof(Name));
						GetPlayerHealth(OtherPlayer, vhealth);
						FPayment = (1000.0 - vhealth) * 1.0;
						Payment = floatround(FPayment, floatround_round);
						SetPlayerHealth(OtherPlayer, 100);
						RewardPlayer(playerid, Payment, 0, 1);
						if(APlayerData[playerid][pVip] >= 1){ RewardPlayer(playerid, 0, 0, 1);}
						RewardPlayer(OtherPlayer, -Payment, 0, 0);
						format(Msg, 128, "{00FF00}Vocк foi curado por {FFFF00}$%i{00FF00} por \"{FFFF00}%s{00FF00}\"", Payment, AssistName);
						SendClientMessage(OtherPlayer, 0xFFFFFFFF, Msg);
						format(Msg, 128, "{00FF00}Vocк curou {FFFF00}%s{00FF00} e ganhou {FFFF00}$%i", Name, Payment);
						SendClientMessage(playerid, 0xFFFFFFFF, Msg);
						// PlayerFile_Save(playerid);
					}
				}
			}
		}
	}
	return 1;
}

// This function allows the assistance player to repair and refuel his own vehicle
Medico_AutoCura(playerid) // vai, to concentrado
{
	SetPlayerHealth(playerid, 100);
	SendClientMessage(playerid, 0xFFFFFFFF, "{00FF00}Vocк se curou.");
}

// This function gets called when the assistance player dies (or changes class)
Medico_EndJob(playerid)
{
	// Kill the PlayerCheckTimer
	KillTimer(APlayerData[playerid][PlayerCheckTimer]);

	// Scan through all players (to reset them to their default colors for the assistance-player)
	for (new PlayerToCheck; PlayerToCheck < MAX_PLAYERS; PlayerToCheck++)
	{
		// Check if this player is connected
		if (IsPlayerConnected(PlayerToCheck))
		{
			// Reset the playercolor based on the player's class
		    switch (APlayerData[PlayerToCheck][PlayerClass])
		    {
		        case ClassTruckDriver: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassTruckDriver);
		        case ClassBusDriver: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassBusDriver);
		        case ClassPilot: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassPilot);
		        case ClassPolice: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassPolice);
		        case ClassMafia: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassMafia);
		        case ClassCourier: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassCourier);
		        case ClassAssistance: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassAssistance);
				case ClassMedico: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassMedico);
		    }
		}
	}

	return 1;
}
Link da imagen do erro : http://pt-br.tinypic.com/r/2u558j9/5
Reply
#2

Tente isso.

pawn Код:
forward Medico_CheckPlayers(playerid);
public Medico_CheckPlayers(playerid)
{
    for (new PlayerToCheck; PlayerToCheck < MAX_PLAYERS; PlayerToCheck++)
    {
        if (IsPlayerConnected(PlayerToCheck))
        {
            if (APlayerData[PlayerToCheck][MedicoNeeded] == true)
                SetPlayerMarkerForPlayer(playerid, PlayerToCheck, 0xFF0000FF);
            else
            {

                switch (APlayerData[PlayerToCheck][PlayerClass])
                {
                    case ClassTruckDriver: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassTruckDriver);
                    case ClassBusDriver: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassBusDriver);
                    case ClassPilot: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassPilot);
                    case ClassPolice: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassPolice);
                    case ClassMafia: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassMafia);
                    case ClassCourier: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassCourier);
                }
            }
        }
    }
}


Medico_FixVehicle(playerid)
{

    new vid, Float:vhealth, Float:FPayment, Payment, Float:x, Float:y, Float:z, Name[24], MedicoName[24], Msg[128];

    GetPlayerName(playerid, MedicoName, sizeof(MedicoName));


    for (new OtherPlayer; OtherPlayer < MAX_PLAYERS; OtherPlayer++)
    {
        if (IsPlayerConnected(OtherPlayer))
        {
            if (OtherPlayer != playerid)
            {
                if (APlayerData[OtherPlayer][MedicoNeeded] == true)
                {
                        GetPlayerPos(OtherPlayer, x, y, z);
                        if (IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z))
                        {
                            APlayerData[OtherPlayer][MedicoNeeded] = false;
                            GetPlayerName(OtherPlayer, Name, sizeof(Name));
                            GetPlayerHealth(vid, vhealth);
                            FPayment = (1000.0 - vhealth) * 1.0;
                            Payment = floatround(FPayment, floatround_round);
                            SetPlayerHealth(playerid, 100);
                            RewardPlayer(playerid, Payment * 2, 1);
                            RewardPlayer(OtherPlayer, -Payment, 0);
                            format(Msg, 128, "{00FF00}Sua vida foi restaurada para {FFFF00}R$%i{00FF00} por {FFFF00}%s", Payment, MedicoName);
                            SendClientMessage(OtherPlayer, 0xFFFFFFFF, Msg);
                            format(Msg, 128, "{00FF00}Vocк deu vida para {FFFF00}%s{00FF00}, e ganhou {FFFF00}R$%i", Name, Payment);
                            SendClientMessage(playerid, 0xFFFFFFFF, Msg);
                            RewardPlayer(playerid, Payment * 2, 1);
                            RewardPlayer(OtherPlayer, -Payment, 0);
                            APlayerData[playerid][StatsMedico]++;
                            format(Msg, 128, "{00FF00}Sua vida foi restaurada para {FFFF00}R$%i{00FF00} por {FFFF00}%s", Payment, MedicoName);
                            SendClientMessage(OtherPlayer, 0xFFFFFFFF, Msg);
                            format(Msg, 128, "{00FF00}Vocк deu vida para {FFFF00}%s{00FF00}, e ganhou {FFFF00}R$%i", Name, Payment);
                            SendClientMessage(playerid, 0xFFFFFFFF, Msg);

                            PlayerFile_Save(playerid);
                        }
                    }
                }
            }
        }

    return 1;
}

Medico_FixOwnVehicle(playerid)
{
    SetPlayerHealth(playerid, 100);
    SendClientMessage(playerid, 0xFFFFFFFF, "Vocк se deu vida");
}


Medico_EndJob(playerid)
{

    KillTimer(APlayerData[playerid][PlayerCheckTimer]);

    for (new PlayerToCheck; PlayerToCheck < MAX_PLAYERS; PlayerToCheck++)
    {
   
        if (IsPlayerConnected(PlayerToCheck))
        {
   
            switch (APlayerData[PlayerToCheck][PlayerClass])
            {
                case ClassTruckDriver: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassTruckDriver);
                case ClassBusDriver: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassBusDriver);
                case ClassPilot: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassPilot);
                case ClassPolice: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassPolice);
                case ClassMafia: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassMafia);
                case ClassCourier: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassCourier);
                case ClassMedico: SetPlayerMarkerForPlayer(playerid, PlayerToCheck, ColorClassMedico);
            }
        }
    }

    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)