if(..) doesn't work correctly.
#1

RESOLVED. Fixed by using empty statement and else.

Good Evening all,
First off, sorry if my description of my problem seems a little vague, i have had no sleep for about 40 hours, and really really cannot be arsed with typing anymore.

Anyway, I seem to be having a problem with an if statement. I requested assistance on such problem before, and now cannot find the thread.

I am trying to see if a player is in the correct type of vehicle, by doing this:
pawn Код:
new m = 403 || 514 || 515;
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) != m) return Error(playerid, 0);
(Before anyone asks, Error(playerid, 0) would do:
pawn Код:
case 0:
        {
            SendClientMessage(playerid, COLOUR, "You are not in the correct vehicle for your job");
        }
)

Can anyone see a problem?

Thanks,
Ash
Reply


Messages In This Thread
if(..) doesn't work correctly. - by Ash. - 16.04.2011, 18:30
Re: if(..) doesn't work correctly. - by Backwardsman97 - 16.04.2011, 19:38

Forum Jump:


Users browsing this thread: 1 Guest(s)