#1

Код:
12453 else if(strcmp(choice,"cargo", true) == 0)
	{
		if(!AircraftDelivery[playerid]) return SendClientMessage(playerid, COLOR_GRAD1, "You are not delivering cargo.");

        SendClientMessage(playerid, COLOR_WHITE, "You have cancelled the cargo delivery.");
        cmd_killcheckpoint(playerid, params);
	}



C:\DOCUME~1\user\Desktop\MARXRE~1\GAMEMO~1\PRRP.pw n(12453) : error 029: invalid expression, assumed zero
C:\DOCUME~1\user\Desktop\MARXRE~1\GAMEMO~1\PRRP.pw n(12453) : warning 215: expression has no effect
C:\DOCUME~1\user\Desktop\MARXRE~1\GAMEMO~1\PRRP.pw n(12453) : error 001: expected token: ";", but found "if"
Reply
#2

Can we please see the lines prior to 12453 too?
Reply
#3

You use "else if" without having an "if" statement before so just use "if" instead.

@PrivatioBoni: He wrote the line number in the first line.
Reply
#4

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
@PrivatioBoni: He wrote the line number in the first line.
I never said he didn't?
Reply
#5

Код:
	if(strcmp(choice,"sex",true) == 0) {	SexOffer[playerid] = 999; SexPrice[playerid] = 0; }
	else if(strcmp(choice,"mats",true) == 0) { MatsOffer[playerid] = 999; MatsPrice[playerid] = 0; MatsAmount[playerid] = 0; }
	else if(strcmp(choice,"pot",true) == 0) { PotOffer[playerid] = 999; PotPrice[playerid] = 0; PotGram[playerid] = 0; }
	else if(strcmp(choice,"crack",true) == 0) { CrackOffer[playerid] = 999; CrackPrice[playerid] = 0; CrackGram[playerid] = 0; }
	else if(strcmp(choice,"weapon",true) == 0) { GunOffer[playerid] = 999; GunId[playerid] = 0; }
	else if(strcmp(choice,"craft",true) == 0) { CraftOffer[playerid] = 999; CraftId[playerid] = 0; }
	else if(strcmp(choice,"repair",true) == 0) {	RepairOffer[playerid] = 999; RepairPrice[playerid] = 0; RepairCar[playerid] = 0; }
	else if(strcmp(choice,"lawyer",true) == 0) { WantLawyer[playerid] = 0; CallLawyer[playerid] = 0; }
	else if(strcmp(choice,"bodyguard",true) == 0) { GuardOffer[playerid] = 999; GuardPrice[playerid] = 0; }
	//else if(strcmp(choice,"refill",true) == 0) { RefillOffer[playerid] = 999; RefillPrice[playerid] = 0; }
	else if(strcmp(choice,"car",true) == 0) { VehicleOffer[playerid] = 999; VehiclePrice[playerid] = 0; VehicleId[playerid] = -1; }
	else if(strcmp(choice,"house",true) == 0) { HouseOffer[playerid] = 999; HousePrice[playerid] = 0; House[playerid] = 0; }
	else if(strcmp(choice,"boxing",true) == 0) { BoxOffer[playerid] = 999; }
	else if(strcmp(choice,"witness",true) == 0) { MarryWitnessOffer[playerid] = 999; }
	else if(strcmp(choice,"marriage",true) == 0) { ProposeOffer[playerid] = 999; }
	else if(strcmp(choice,"divorce",true) == 0) { DivorceOffer[playerid] = 999; }
	else if(strcmp(choice,"drink",true) == 0) { DrinkOffer[playerid] = INVALID_PLAYER_ID; }
	else if(strcmp(choice,"truck",true) == 0)
 12453	else if(strcmp(choice,"cargo", true) == 0)
explain this plz
Reply
#6

You don't having anything in case the condition is true so it takes the next line as function for that statement. Basically, it's like doing:
pawn Код:
else if(strcmp(choice,"truck",true) == 0)
{
    else if(strcmp(choice,"cargo", true) == 0)
    {
    }
}
Add some code in it or else you don't need it, just remove it. Or in case you need it for later, comment the line or:
pawn Код:
else if(strcmp(choice,"truck",true) == 0) {}
else if(strcmp(choice,"cargo", true) == 0)
{
    // code..
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)