[Ajuda] Warning Malditos !
#1

PESSOAL ME AJUDEM URGENTE COM ISSO
pawn Код:
\pawno\include\PPC_MissionsLixeiro.inc(78) : warning 204: symbol is assigned a value that is never used: "LoadMsgs"
\pawno\include\PPC_MissionsPizza.inc(78) : warning 204: symbol is assigned a value that is never used: "LoadMsgs"
o PPC_Pizza й o msm do Lixeiro entгo vou coloca aqui sу 1

pawn Код:
// This function gets called whenever a courier player enters "/work"
Pizza_StartJob(playerid)
{
    // Setup local variables
    new HouseCounter, HousesInRange[200], DialogList[200];

    // First clear the house-list
    for (new i; i < 11; i++)
        APlayerData[playerid][CourierHouses][i] = 0;

    // Count how many owned houses are in range of the player
    for (new HouseID = 1; HouseID < MAX_HOUSES; HouseID++)
    {
        // Check if the house is owned
        if (AHouseData[HouseID][Owned] == true)
        {
            // Check if the house is in range of the player
            if (IsPlayerInRangeOfPoint(playerid, LixeiroJobRange, AHouseData[HouseID][HouseX], AHouseData[HouseID][HouseY], AHouseData[HouseID][HouseZ]))
            {
                // Check if there aren't 200 in-range houses have been found yet
                if (HouseCounter < 200)
                {
                    HousesInRange[HouseCounter] = HouseID; // Store the HouseID in the list of in-range houses
                    HouseCounter++; // Increase the number of owned houses in range of the player (range = 1000 meters)
                }
                else
                {
                    break; // Stop searching for more houses (200 is the maximum)
                }
            }
        }
    }

    // Abort the mission if there are less than 2 houses in range and inform the player
    if (HouseCounter < 2)
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Nгo а casa no local para Entregar Pizzas, tente algum outro ponto");
        return 0;
    }
    if (HouseCounter >= 2)
    {
        format(DialogList, sizeof(DialogList), "Entregar 2 Pizzas\n"); // Add the line to the dialog
        APlayerData[playerid][CourierMaxStep] = 2; // Set the number of houses for the job to 2
    }
    if (HouseCounter >= 5)
    {
        format(DialogList, sizeof(DialogList), "%sEntregar 5 Pizzas\n", DialogList); // Add the line to the dialog
        APlayerData[playerid][CourierMaxStep] = 5; // Set the number of houses for the job to 5
    }
    if (HouseCounter >= 10)
    {
        format(DialogList, sizeof(DialogList), "%sEntregar 10 Pizzas\n", DialogList); // Add the line to the dialog
        APlayerData[playerid][CourierMaxStep] = 10; // Set the number of houses for the job to 10
    }

    APlayerData[playerid][CourierHouses][1] = HousesInRange[random(HouseCounter)];
    // Now choose as many houses randomly as allowed, starting from the second
    for (new i = 2; i <= APlayerData[playerid][CourierMaxStep]; i++)
    {
        // Copy a random HouseID from the prepared list on in-range houses to the job-list
        APlayerData[playerid][CourierHouses][i] = HousesInRange[random(HouseCounter)];

        // If the HouseID is the same as the previous HouseID (the player would visit the same house twice in a row)
        while (APlayerData[playerid][CourierHouses][i - 1] == APlayerData[playerid][CourierHouses][i])
            APlayerData[playerid][CourierHouses][i] = HousesInRange[random(HouseCounter)]; // Get a new random HouseID as long as the HouseID is the same as the previous one
    }

    // Let the player choose how many packages he wants to deliver
    ShowPlayerDialog(playerid, DialogCourierSelectQuant, DIALOG_STYLE_LIST, "Escolha quantas Pizzas vocк deseja Entregar:", DialogList, TXT_DialogButtonSelect, TXT_DialogButtonCancel);

    return 1;
}

// This function is called when the player has chosen how many packages he wants to deliver
Pizza_BeginJob(playerid)
{
    // Setup local variables
    new Pizza[128], Step, HouseID, Float:x, Float:y, Float:z,LoadMsgs[128];

    // Job has started
    APlayerData[playerid][JobStarted] = true;
    // Store the vehicleID (required to be able to check if the player left his vehicle)
    APlayerData[playerid][VehicleID] = GetPlayerVehicleID(playerid);
    // Set jobstep to 1 (going to the first house)
    Step = 1;
    APlayerData[playerid][JobStep] = Step;
    // Get the HouseID of the house where the mission starts (the first house in the list of in-range owned house)
    HouseID = APlayerData[playerid][LixeiroHouses][Step];
    // Set the TextDraw so the player can see it
    format(Pizza, 255, TXT_PizzaTextDraw, Step, APlayerData[playerid][CourierMaxStep], AHouseData[HouseID][HouseName]);
    TextDrawSetString(APlayerData[playerid][MissionText], Pizza);
    // Grab the x, y, z positions for the first location
    x = AHouseData[HouseID][HouseX];
    y = AHouseData[HouseID][HouseY];
    z = AHouseData[HouseID][HouseZ];
    // Create a checkpoint where the player should deliver his package
    SetPlayerCheckpoint(playerid, x, y, z, 3);
    // Set the job-fail-time for the global vehicle-timer
    APlayerData[playerid][VehicleTimerTime] = Job_TimeToFailMission;
    // Send the player a message to inform him that the mission has started

    return 1;
}



// This function is called when a courier enters a checkpoint
Pizza_OnPlayerEnterCheckpoint(playerid)
{
    // Setup local variables
    new Pizza[128], Step, HouseID, Float:x, Float:y, Float:z, Name[24], Msg[128], Payment;

    // Check if the player is outside his vehicle while entering a checkpoint
    if (GetPlayerVehicleSeat(playerid) == -1)
    {
        // Check if all the packages haven't been delivered
        if (APlayerData[playerid][CourierMaxStep] != APlayerData[playerid][JobStep])
        {
            // First disable the current checkpoint
            DisablePlayerCheckpoint(playerid);
            // Let the player know he delivered a package
            GameTextForPlayer(playerid, TXT_PizzaDeliveredGameText, 5000, 4);
            SendClientMessage(playerid, 0xFFFFFFFF, TXT_PizzaDeliveredMessage);
            // Set next JobStep (next house)
            APlayerData[playerid][JobStep]++;
            Step = APlayerData[playerid][JobStep];
            // Get the HouseID of the house where the mission starts (the first house in the list of in-range owned house)
            HouseID = APlayerData[playerid][CourierHouses][Step];
            // Set the TextDraw so the player can see it
            format(Pizza, 255,"~w~Entregar pizzas ~b~%i/%i~w~ para: ~r~%s", Step, APlayerData[playerid][CourierMaxStep], AHouseData[HouseID][HouseName]);
            TextDrawSetString(APlayerData[playerid][MissionText], Pizza);
            // Grab the x, y, z positions for the first location
            x = AHouseData[HouseID][HouseX];
            y = AHouseData[HouseID][HouseY];
            z = AHouseData[HouseID][HouseZ];
            // Create a checkpoint where the player should deliver his package
            SetPlayerCheckpoint(playerid, x, y, z, 3);
        }
        else // All packages have been delivered, the player has to get paid now
        {
            // Get the player name
            GetPlayerName(playerid, Name, sizeof(Name));
            // Send a message to all players to inform them that this player completed a courier-job
            format(Msg, 128, TXT_PlayerCompletedPizzaJob, Name, APlayerData[playerid][CourierMaxStep]);
            SendClientMessageToAll(0xFFFFFFFF, Msg);
            // Set a payment based on the number of packages
            Payment = APlayerData[playerid][CourierMaxStep] * PaymentPerPackage;
            // Pay the player money and give scorepoints, both based on the number of packages delivered
            RewardPlayer(playerid, Payment, APlayerData[playerid][CourierMaxStep]);
            // Send a message to let the player know he finished his mission and got paid
            format(Msg, 128, TXT_RewardJob, Payment);
            SendClientMessage(playerid, 0xFFFFFFFF, Msg);

            // Increase the stats for completing a courier job
            APlayerData[playerid][StatsPizzaJobs]++;
            // End the current trucker job (clear mission-data)
            Courier_EndJob(playerid);
            // Also save the data (in case the server crashes, progress would be lost)
            PlayerFile_Save(playerid);
        }
    }
    else
        SendClientMessage(playerid, 0xFFFFFFFF, TXT_NeedOnFootToProceed);

    return 1;
}



// This function is used to stop any Courier-mission that has been started
Pizza_EndJob(playerid)
{
    if (APlayerData[playerid][JobStarted] == true)
    {
        // Clear all data about the job from the player, so he can start a new one
        APlayerData[playerid][JobStarted] = false;
        APlayerData[playerid][JobStep] = 0;
        APlayerData[playerid][VehicleTimerTime] = 0;
        APlayerData[playerid][VehicleID] = 0;
        APlayerData[playerid][CourierMaxStep] = 0;

        // Clear the list of houses-in-range
        for (new i; i < 11; i++)
            APlayerData[playerid][CourierHouses][i] = 0;

        // Delete the checkpoint
        DisablePlayerCheckpoint(playerid);
        // Reset the missiontext
        TextDrawSetString(APlayerData[playerid][MissionText], Pizza_NoJobText);
    }

    return 1;
}
i Outra ! WARNING NO DOF2
pawn Код:
\pawno\include\DOF2.inc(1391) : warning 219: local variable "a" shadows a variable at a preceding level
\pawno\include\DOF2.inc(1391) : warning 219: local variable "b" shadows a variable at a preceding level
AQUI O DOF2 INTEIRO

COMO Й MUITA LINHA DE CODIGO COLOQUEI NO PASTEBIN
CLICK AQUI I VEJA !
Reply
#2

deleta o LoadMSG
Reply
#3

De uma olhada neste tуpico em Erros comuns.

https://sampforum.blast.hk/showthread.php?tid=252966
Reply
#4

#define LoadMsg SendClientMessage(playerid, 0xFFFF00, "Vocк estб carregando aguarde");


Inclide DOF2:

https://www.dropbox.com/s/ry79fj7si8rttrr/DOF2.inc

Tente entender melhor o GM PPC_Trucking este texto deveria estar definido na include: PPC_DefTexts ok
caso nгo esteja, coloque isso nela.
Reply
#5

@foca
No PPC_Pizza continua o msm

no DOF2 acrescentou + 1 warning
pawn Код:
gamemodes\RodoviaBrasil.pwn(1748) : warning 203: symbol is never used: "DOF2_Exit"
Reply
#6

em ongamemodexit

pawn Код:
DOF2_Exit();
Reply
#7

OnGamemodeExit ?
Nao existe nao sera
OnGamemodeInit ?

@Edit
Coloquei no OngamemodeInit i saiu o warning mais continua esses
pawn Код:
\pawno\include\DOF2.inc(1391) : warning 219: local variable "a" shadows a variable at a preceding level
\pawno\include\DOF2.inc(1391) : warning 219: local variable "b" shadows a variable at a preceding level
\pawno\include\PPC_MissionsLixeiro.inc(79) : warning 204: symbol is assigned a value that is never used: "LoadMsgs"
Reply
#8

fera e em
pawn Код:
OnGamemodeExit
Reply
#9

Nao tem On Game Mode EXIT No meu GM i nem no DOF2
Reply
#10

LoL mano nгo tem isso nгo?

pawn Код:
public OnGameModeExit()
{

return 1;
}
se nгo tiver add no final do gm -.-'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)