Jump to content

Question

Posted

Salut !! am si eu un server de trucking PPC ;), si am incercat sa adug clase noi...(ex: taximetrist, pizzaboy) :), am adugat si cand dau compile/run la Gm imi da error :( :

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(45) : error 017: undefined symbol "PizzaMaxStep"

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(50) : error 017: undefined symbol "PizzaMaxStep"

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(55) : error 017: undefined symbol "PizzaMaxStep"

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(61) : error 017: undefined symbol "PizzaMaxStep"

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(93) : error 017: undefined symbol "PizzaMaxStep"

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(184) : error 017: undefined symbol "PizzaMaxStep"

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_Dialogs.inc(173) : error 002: only a single statement (or expression) can follow each "case"

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_Dialogs.inc(173 -- 174) : error 028: invalid subscript (not an array or too many subscripts): "listitem"

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_Dialogs.inc(173 -- 176) : error 001: expected token: "}", but found "if"

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_Dialogs.inc(173 -- 176) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

10 Errors.

7 answers to this question

Recommended Posts

Posted

ai defini MaxStep dupa courier in ppc_defines? :-?

<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

Posted

Erorile le-am rezolvat...dar acm am warnings :))

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(45) : warning 213: tag mismatch

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(50) : warning 213: tag mismatch

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(55) : warning 213: tag mismatch

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(61) : warning 213: tag mismatch

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(93) : warning 213: tag mismatch

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(121) : warning 213: tag mismatch

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(134) : warning 213: tag mismatch

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(148) : warning 213: tag mismatch

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(151) : warning 213: tag mismatch

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(153) : warning 213: tag mismatch

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_MissionsPizza.inc(184) : warning 213: tag mismatch

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_Dialogs.inc(487) : warning 213: tag mismatch

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_Dialogs.inc(488) : warning 213: tag mismatch

C:\Documents and Settings\Adytzzu\Desktop\[RTT]\pawno\include\PPC_Dialogs.inc(489) : warning 213: tag mismatch

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

14 Warnings.

Posted

// Process the chosen quantity for pizza job

Dialog_PizzaSelectQuant(playerid, response, listitem)

{

// Just close the dialog if the player clicked "Cancel"

if(!response) return 1;

// Listitem 0 represent maximum 2 houses to deliver a package, listitem 1 is max 5 houses, item 2 is max 10 houses

switch (listitem)

{

487 case 0: APlayerData[playerid][PizzaMaxStep] = 2;

488 case 1: APlayerData[playerid][PizzaMaxStep] = 5;

489 case 2: APlayerData[playerid][PizzaMaxStep] = 10;

}

// Start the job

Pizza_BeginJob(playerid);

return 1;

}

Liniile : 487, 488, 489 PPC_Dialogs

Posted

uite missinonpizza ti-am facuto eu

[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][PizzaHouses] = 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, PizzaJobRange, 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}Not enough owned houses in range to deliver packages, try some other spot");

return 0;

}

// Try to add the 3 lines to the dialog-list

if (HouseCounter >= 2)

{

    format(DialogList, sizeof(DialogList), "Deliver 2 packages\n"); // Add the line to the dialog

APlayerData[playerid][PizzaMaxStep] = 2; // Set the number of houses for the job to 2

}

if (HouseCounter >= 5)

{

    format(DialogList, sizeof(DialogList), "%sDeliver 5 packages\n", DialogList); // Add the line to the dialog

APlayerData[playerid][PizzaMaxStep] = 5; // Set the number of houses for the job to 5

}

if (HouseCounter >= 10)

{

    format(DialogList, sizeof(DialogList), "%sDeliver 10 packages\n", DialogList); // Add the line to the dialog

APlayerData[playerid][PizzaMaxStep] = 10; // Set the number of houses for the job to 10

}

// Choose a random house for the first house to visit

APlayerData[playerid][PizzaHouses][1] = HousesInRange[random(HouseCounter)];

// Now choose as many houses randomly as allowed, starting from the second

for (new i = 2; i <= APlayerData[playerid][PizzaMaxStep]; i++)

{

// Copy a random HouseID from the prepared list on in-range houses to the job-list

    APlayerData[playerid][PizzaHouses] = 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][PizzaHouses][i - 1] == APlayerData[playerid][PizzaHouses])

APlayerData[playerid][PizzaHouses] = 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, DialogPizzaSelectQuant, DIALOG_STYLE_LIST, "Choose how many packages you want to deliver", 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 RouteText[128], Step, HouseID, Float:x, Float:y, Float:z;

// 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][PizzaHouses][step];

// Set the TextDraw so the player can see it

format(RouteText, 255, "~w~Deliver package ~b~%i/%i~w~ to: ~r~%s", Step, APlayerData[playerid][PizzaMaxStep], AHouseData[HouseID][HouseName]);

TextDrawSetString(APlayerData[playerid][MissionText], RouteText);

// 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

SendClientMessage(playerid, 0xFFFFFFFF, "{00FF00}Deliver packages to player's houses");

return 1;

}

// This function is called when a Pizza enters a checkpoint

Pizza_OnPlayerEnterCheckpoint(playerid)

{

// Setup local variables

new RouteText[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][PizzaMaxStep] != APlayerData[playerid][JobStep])

{

// First disable the current checkpoint

DisablePlayerCheckpoint(playerid);

// Let the player know he delivered a package

GameTextForPlayer(playerid, TXT_PackageDeliveredGameText, 5000, 4);

SendClientMessage(playerid, 0xFFFFFFFF, TXT_PackageDeliveredMessage);

// 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][PizzaHouses][step];

// Set the TextDraw so the player can see it

format(RouteText, 255, "~w~Deliver package ~b~%i/%i~w~ to: ~r~%s", Step, APlayerData[playerid][PizzaMaxStep], AHouseData[HouseID][HouseName]);

TextDrawSetString(APlayerData[playerid][MissionText], RouteText);

// 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 Pizz-job

format(Msg, 128, TXT_PlayerCompletedPizzaJob, Name, APlayerData[playerid][PizzaMaxStep]);

SendClientMessageToAll(0xFFFFFFFF, Msg);

// Set a payment based on the number of packages

Payment = APlayerData[playerid][PizzaMaxStep] * PaymentPerPackage;

// Pay the player money and give scorepoints, both based on the number of packages delivered

RewardPlayer(playerid, Payment, APlayerData[playerid][PizzaMaxStep]);

// 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 pizza job

APlayerData[playerid][statsPizzaJobs]++;

// End the current trucker job (clear mission-data)

Pizza_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 Pizza-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][PizzaMaxStep] = 0;

// Clear the list of houses-in-range

for (new i; i < 11; i++)

APlayerData[playerid][PizzaHouses] = 0;

// Delete the checkpoint

DisablePlayerCheckpoint(playerid);

// Reset the missiontext

TextDrawSetString(APlayerData[playerid][MissionText], Pizza_NoJobText);

}

return 1;

}

[/pawn]

iar dialogs sterge ce e legat de pizza ca functioneaza pe courier eu asa am :-??

<a href="http://www.game-state.eu/188.212.105.161:7777/"><img src="http://www.game-state.eu/188.212.105.161:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.eu" style="border-style: none;" /></a>

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.