[Help]Error
#1

Hello. My code is:

pawn Код:
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.
Reply
#2

Try this

pawn Код:
if(engineOn[GetPlayerVehicleID(playerid)])
Reply
#3

No, not working.
Reply
#4

What kind of variable is engineOn? ( new engineOn ..)?
Reply
#5

Never mind, i've done it by myself. Thanks anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)