SA-MP Forums Archive
error 036: empty statement - 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: error 036: empty statement (/showthread.php?tid=528470)



error 036: empty statement - Don_Cage - 28.07.2014

So what's wrong with the code?
Marked the error line as you can see in the code below
pawn Код:
CMD:buycar(playerid, params[])
{
    new carid, name[MAX_PLAYER_NAME];
    if(IsPlayerInAnyVehicle(playerid))
    {
        carid = GetPlayerVehicleID(playerid);
        if(IsASalesVeh(carid))
        {
            if(GetPlayerMoney(playerid) >= cInfo[carid][Price]); // Error line
            {
                GetPlayerName(playerid, name, sizeof(name));
                cInfo[carid][Owned] = 1;
                strmid(cInfo[carid][Owner], name, 0, strlen(name), 999);
                GiveCash(playerid, -cInfo[carid][Price]);
            }
            else return SCM(playerid, -1, "You can't afford this vehicle");
        }
        else return SCM(playerid, -1, "This isn't a Dealership vehicle");
    }
    else return SCM(playerid, -1, "You're not in a vehicle");
    return true;
}



Re: error 036: empty statement - Stanford - 28.07.2014

Remove ; and you're fine,
I hope I helped, any feedback would be appreciated.


Re: error 036: empty statement - Don_Cage - 28.07.2014

Lol, I think I should get glasses. Didn't see that haha!
Anyway, thanks! +REP