Little question (about "if")
#1

Hi guys, my questions is the next:
When you use ">>", "?", ":", or "<<", in "if", what that will do?


Example:

MidoStream:
pawn Код:
public MoveTimer(id2,xadd,yadd,zadd,bool:xisbigger,bool:yisbigger,bool:zisbigger)
{
    new bool:reached = false;
    reached = xisbigger ? ((Objects[id2][xpos] >= Objects[id2][movx]) ? true : false) : ((Objects[id2][xpos] <= Objects[id2][movx]) ? true : false);
    if (reached)
    {
        reached = yisbigger ? ((Objects[id2][ypos] >= Objects[id2][movy]) ? true : false) : ((Objects[id2][ypos] <= Objects[id2][movy]) ? true : false);
        if (reached)
        {
            reached = zisbigger ? ((Objects[id2][zpos] >= Objects[id2][movz]) ? true : false) : ((Objects[id2][zpos] <= Objects[id2][movz]) ? true : false);
        }
    }

Thanks, and sorry for my bad english :\
Reply


Messages In This Thread
Little question (about "if") - by MrDeath537 - 15.07.2010, 02:56
Re: Little question (about "if") - by bigcomfycouch - 15.07.2010, 03:06

Forum Jump:


Users browsing this thread: 1 Guest(s)