SA-MP Forums Archive
[Help]Error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help]Error (/showthread.php?tid=307140)



[Help]Error - Tautwis - 29.12.2011

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.


Re: [Help]Error - MadeMan - 29.12.2011

Try this

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



Re: [Help]Error - Tautwis - 29.12.2011

No, not working.


Re: [Help]Error - FarSe. - 29.12.2011

What kind of variable is engineOn? ( new engineOn ..)?


Re: [Help]Error - Tautwis - 29.12.2011

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