PDA

View Full Version : [Help]Error


Tautwis
29/12/2011, 12:55 PM
Hello. My code is:

if(strcmp(x_job,"fuel",true) == 0)
{
if(IsAtGasStation(playerid))
{
if(engineOn[GetPlayerVehicleID(playerid)] == true)
{
SendClientMessage(playerid, COLOR_GREY, "Vehicle engine should be turned off");
return 1;
}
else
{
new price = 20 * SBizzInfo[3][sbEntranceCost];
format(string, sizeof(string), "* You filled your Gas Can with 20% Fuel for $%d",price);
SendClientMessage(playerid, COLOR_WHITE, string);
PlayerInfo[playerid][pFuel] = 20;
SafeGivePlayerMoney(playerid, - price);
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_GREY,"** You are not at the gas station!");
return 1;
}
}
else { return 1; }
}//not connected
return 1;
}

ant the error is:

warning 213: tag mismatch

The error starts at if(engineOn[GetPlayerVehicleID(playerid)] == true)

Thanks for the help ^^

P.S dont look at if(strcmp(x_job,"fuel",true) == 0), its a copy/paste fault.

MadeMan
29/12/2011, 12:57 PM
Try this


if(engineOn[GetPlayerVehicleID(playerid)])

Tautwis
29/12/2011, 01:14 PM
No, not working.

FarSe.
29/12/2011, 01:28 PM
What kind of variable is engineOn? ( new engineOn ..)?

Tautwis
29/12/2011, 01:34 PM
Never mind, i've done it by myself. Thanks anyway :)