07.02.2009, 09:33
when using else if, its supposed to look like this:
You wouldn't do what you have done, which is:
The above example WOULD work, but isn't necessary, yours wont work, because there is no DOUBLE ELSE with the same condution. So when ever IF is not what you want it to be, else will be called, UNLESS, there is a else if.
pawn Код:
if(Function1()) // if this is wrong, else will be called, unless there is a else if.
{
return true;
}
else if(Function2())
{
return false;
}
else
{
return false;
}
pawn Код:
if(Function1())
{
return true;
}
else
{
if(Function2())
{
return false;
}
}

