[4ERRORS] if(Autoid == Takso1) || Autoid == Takso2 || Autoid == Takso2) Autoid == Takso3) Autoid == Takso4)
#1

I added this code under Public OnPlayerStateChange


Код:

if(newstate == 2)
    {
    new Autoid = GetPlayerVehicleID(playerid);
    if(Autoid == Takso1) || Autoid == Takso2 || Autoid == Takso2) Autoid == Takso3) Autoid == Takso4)
    if(PlayerInfo[playerid][pAmet] == 5)
	{
	SendClientMessage(playerid, HALL, "Mootor ei tццta, /mootor kдivitamiseks");
	TogglePlayerControllable(playerid,0);
    }
    else
    {
    SendClientMessage(playerid, HALL, "Sul pole selle sхiduki vхtmeid!");
    RemovePlayerFromVehicle(playerid);
    }
Errors:


(5277) : error 029: invalid expression, assumed zero
(5277) : warning 215: expression has no effect
(5277) : error 001: expected token: ";", but found ")"
(5277) : error 029: invalid expression, assumed zero
(5277) : fatal error 107: too many error messages on one line
Reply
#2

Try this
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == 2)
    {
        new Autoid = GetPlayerVehicleID(playerid);
        if(Autoid == Takso1 || Autoid == Takso2 || Autoid == Takso2 || Autoid == Takso3 || Autoid == Takso4)
        {
            if(PlayerInfo[playerid][pAmet] == 5)
            {
                SendClientMessage(playerid, HALL, "Mootor ei tццta, /mootor kдivitamiseks");
                TogglePlayerControllable(playerid,0);
            }
            else
            {
                SendClientMessage(playerid, HALL, "Sul pole selle sхiduki vхtmeid!");
                RemovePlayerFromVehicle(playerid);
            }
        }
    }
    return 1;
}
Your if statment was wrong you added to many parentheses ')'
Reply
#3

Thank you very much, i forgot that,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)