error 036: empty statement
#1

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;
}
Reply
#2

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)