Car Limit
#1

Hi , i want to limit my faction cars but , i have an error

pawn Код:
new Taxi[15];
pawn Код:
if(newcar => Taxi[0] && newcar =< Taxi[10])
        {
            if(PlayerInfo[playerid][pMember] != 10 && PlayerInfo[playerid][pLeader] != 10)
            {
                SendClientMessage(playerid,COLOR_WHITE,"Nu esti membru {FFFF00}Agentia Taxi{FFFFFF}!");
                RemovePlayerFromVehicle(playerid);
            }
            if(newcar => Taxi[4] && newcar =< Taxi[7] && PlayerInfo[playerid][pRank] < 2)
            {
                SendClientMessage(playerid,COLOR_GREY,"Iti trebuie {FFFF00}rank 2{FFFFFF}!");
                RemovePlayerFromVehicle(playerid);
            }
            if(newcar => Taxi[8] && newcar =< Taxi[9] && PlayerInfo[playerid][pRank] < 4)
            {
                SendClientMessage(playerid,COLOR_GREY,"Iti trebuie {FFFF00}rank 4{FFFFFF}!");
                RemovePlayerFromVehicle(playerid);
            }
            if(newcar == Taxi[10]  && PlayerInfo[playerid][pRank] < 6)
            {
                SendClientMessage(playerid,COLOR_GREY,"Iti trebuie {5D4F3E}rank 6{FFFFFF}!");
                RemovePlayerFromVehicle(playerid);
            }
        }
At this line is the error
pawn Код:
newcar => Taxi[0] && newcar =< Taxi[10]
And The Error
pawn Код:
E:\Server Samp\gamemodes\XGamers.pwn(7743) : warning 211: possibly unintended assignment
E:\Server Samp\gamemodes\XGamers.pwn(7743) : error 029: invalid expression, assumed zero
E:\Server Samp\gamemodes\XGamers.pwn(7743) : error 022: must be lvalue (non-constant)
E:\Server Samp\gamemodes\XGamers.pwn(7743) : error 029: invalid expression, assumed zero
E:\Server Samp\gamemodes\XGamers.pwn(7743) : fatal error 107: too many error messages on one line
Reply
#2

>= and <=

not

=> and =<

Also, that check will most likely fail, nothing assures you that Taxi[0] to Taxi[10] are consecutive numbers. You need a loop, or check them individually.
Reply
#3

And how to make the comand to work ? I put
pawn Код:
if(newcar => Taxi[0] && newcar <= Taxi[10])
But no work
Reply
#4

Change:
Код:
if(newcar => Taxi[0] && newcar <= Taxi[10])
To:
Код:
if(newcar >= Taxi[0] && newcar <= Taxi[10])
Reply
#5

I saw And Thx to all
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)