Help ME!
#1

C:\Users\T42eleven\Desktop\all programs\samp server\gamemodes\gtarp.pwn(5464) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.((I deleted them from this because they are not what i need fixed))


5459: {
5460: }
5461: }
5462: Return 1;
5463: }
5464: If (DrugFarmerVar[playerid] == 1)
5465: {

Please help me!
Reply
#2

unreachable code means that something is terminating the function before it can get to the code, im assuming in this case its the return 1; however i cannot be sure as this is only part of the function, could you please post the whole function?
Reply
#3

fixed this so you know what lines it is.
What do you mean the whole function?
The entire thing till the next Return;?
Reply
#4

like the whole function
pawn Код:
public OnPlayerUpdate(playerid)
{
    return 1;
}
is a function, yours is probably longer but i need it till the last bracket, granted you have indented properly
Reply
#5

ok here it is
((Do you have Teamviewer?))

return 1;
}
if(DrugFarmerVar[playerid] == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
new carid = GetPlayerVehicleID(playerid);
new cash=(random(250-100)+100);
if(IsADrugHarvest(carid))
{
switch(DrugFarmerPickup[playerid][0])
{
case 0:
{
SetPlayerCheckpoint(playerid, -181.4144,167.2931,7.8413, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 1:
{
SetPlayerCheckpoint(playerid, -184.1222,-66.2325,3.1172, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 2:
{
SetPlayerCheckpoint(playerid, -39.6705,-102.2681,3.1172, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 3:
{
SetPlayerCheckpoint(playerid, 35.3907,-74.2866,0.9706, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 4:
{
SetPlayerCheckpoint(playerid, 58.6579,-3.7121,1.6909, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 5:
{
SetPlayerCheckpoint(playerid, 19.7974,43.5431,3.1172, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 6:
{
SetPlayerCheckpoint(playerid, -34.1614,73.9170,3.1096, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 7:
{//drop-off
if(JustStarted[playerid] != 1)
{
PlayerInfo[playerid][pPayCheck] += cash * 5;
drugsys[DrugAmmount]++;
format(string, sizeof(string), "~w~Added to your paycheck~n~~b~$%d",cash);
GameTextForPlayer(playerid, string, 5000, 1);
SaveDrugSystem();
}
else
{
JustStarted[playerid] = 0;
}
SetPlayerCheckpoint(playerid, 30.2059,20.1222,3.1172, 5.0);
}
case 8:
{
SetPlayerCheckpoint(playerid, -21.3052,-60.9220,3.1172, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 9:
{
SetPlayerCheckpoint(playerid, -191.6069,-70.8331,3.1172, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 10:
{
SetPlayerCheckpoint(playerid, -253.8518,-3.7909,2.5041, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 11:
{
SetPlayerCheckpoint(playerid, -178.0497,128.4783,3.8665, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 12:
{
SetPlayerCheckpoint(playerid, -110.8844,143.1536,3.1144, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 13:
{
SetPlayerCheckpoint(playerid, -34.1614,73.9170,3.1096, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 14:
{//drop-off
if(JustStarted[playerid] != 1)
{
PlayerInfo[playerid][pPayCheck] += cash * 5;
drugsys[DrugAmmount]++;
format(string, sizeof(string), "~w~Added to your paycheck~n~~b~$%d",cash);
GameTextForPlayer(playerid, string, 5000, 1);
SaveDrugSystem();
}
else
{
JustStarted[playerid] = 0;
}
SetPlayerCheckpoint(playerid, -164.3909,28.9677,3.1172, 5.0);
}
case 15:
{
SetPlayerCheckpoint(playerid, -213.1695,-26.4404,3.1172, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 16:
{
SetPlayerCheckpoint(playerid, -11.7208,-10.7312,3.1172, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 17:
{
SetPlayerCheckpoint(playerid, 11.4609,-90.3436,2.0164, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 18:
{
SetPlayerCheckpoint(playerid, 63.1697,-22.5562,1.2136, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 19:
{
SetPlayerCheckpoint(playerid, 23.2130,30.9418,3.1172, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 20:
{
SetPlayerCheckpoint(playerid, -134.6788,151.1453,3.9566, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 21:
{
SetPlayerCheckpoint(playerid, -34.1614,73.9170,3.1096, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 22:
{//drop-off
if(JustStarted[playerid] != 1)
{
PlayerInfo[playerid][pPayCheck] += cash * 5;
drugsys[DrugAmmount]++;
format(string, sizeof(string), "~w~Added to your paycheck~n~~b~$%d",cash);
GameTextForPlayer(playerid, string, 5000, 1);
SaveDrugSystem();
}
else
{
JustStarted[playerid] = 0;
}
SetPlayerCheckpoint(playerid, 45.6651,35.6647,2.1518, 5.0);
}
case 23:
{
SetPlayerCheckpoint(playerid, 65.9438,-13.9811,1.3468, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 24:
{
SetPlayerCheckpoint(playerid, 17.1980,-86.7067,1.7758, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 25:
{
SetPlayerCheckpoint(playerid, -7.0889,-19.7445,3.1172, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 26:
{
SetPlayerCheckpoint(playerid, -185.1862,155.1479,6.5185, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 27:
{
SetPlayerCheckpoint(playerid, -184.7949,-57.7402,3.1172, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 28:
{
SetPlayerCheckpoint(playerid, -263.0331,-45.5427,3.1172, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 29:
{
SetPlayerCheckpoint(playerid, -34.1614,73.9170,3.1096, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 30:
{//drop-off
if(JustStarted[playerid] != 1)
{
PlayerInfo[playerid][pPayCheck] += cash * 5;
drugsys[DrugAmmount]++;
format(string, sizeof(string), "~w~Added to your paycheck~n~~b~$%d",cash);
GameTextForPlayer(playerid, string, 5000, 1);
SaveDrugSystem();
}
else
{
JustStarted[playerid] = 0;
}
SetPlayerCheckpoint(playerid, -255.7015,-3.0833,2.4276, 5.0);
}
case 31:
{
SetPlayerCheckpoint(playerid, -171.7835,-59.3110,3.1172, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 32:
{
SetPlayerCheckpoint(playerid, -153.4347,143.9473,4.1833, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 33:
{
SetPlayerCheckpoint(playerid, 49.4775,24.9682,1.8078, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 34:
{
SetPlayerCheckpoint(playerid, -9.5707,-36.4109,3.1172, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 35:
{
SetPlayerCheckpoint(playerid, 35.6805,-95.6367,0.6169, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 36:
{
SetPlayerCheckpoint(playerid, -34.1614,73.9170,3.1096, 5.0);
if(JustStarted[playerid] != 0)
{
JustStarted[playerid] = 0;
}
}
case 37:
{//last drop-off
PlayerInfo[playerid][pPayCheck] += cash * 5;
drugsys[DrugAmmount]++;
SaveDrugSystem();
DisablePlayerCheckpoint(playerid);
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~w~Use /exit to leave a harvest~n~~b~This is enough for this payday", 5000, 1);
}
}
DrugFarmerPickup[playerid][0]++;
PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
}
}
return 1;
Reply
#6

May you use it in please ? I got Confused
Reply
#7

what do you mean? i dont understand what you mean?
Reply
#8

well... it looks like it should be good, where is this code located?
Reply
#9

what the hell do you mean
Dowster do you have Teamviewer?
Reply
#10

yep, pm me your pass and id
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)