elseif phrase
#6

Even if its the wrong section im gonna explain this.

else if always is in connection with another if. So if the first if fails, it will call the else phrase, if it is defined.
With else if you then put another condition into that else phrase, this one is checked then.

pawn Код:
if (b >= 1) {
    // called if b is bigger or equal to 1
} else {
    // called, when b is NOT bigger or equal to 1
}

if (a >= 1) {
    // called if a is bigger or equal to 1
} else if (a < 0) {
    // called if the first check failed, and a is less than 0
}
else if alone without another if wont work, but after the first if, you can add as many else and else if phrases as you like.
Reply


Messages In This Thread
elseif phrase - by Jing_Chan - 31.12.2013, 00:09
Re: elseif phrase - by Patrick - 31.12.2013, 01:00
Re: elseif phrase - by Jing_Chan - 31.12.2013, 01:50
Re: elseif phrase - by ev0lution - 31.12.2013, 01:57
Re: elseif phrase - by Mattakil - 31.12.2013, 02:24
Re: elseif phrase - by Mauzen - 31.12.2013, 02:24

Forum Jump:


Users browsing this thread: 5 Guest(s)