Else error?!
#4

Quote:
Originally Posted by max007
Quote:
Originally Posted by [NT
Extremo ]
when using else if, its supposed to look like this:
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;
}
You wouldn't do what you have done, which is:
pawn Код:
if(Function1())
{
  return true;
}
else
{
  if(Function2())
  {
    return false;
  }
}
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.
So... can i use a lot of else if and it will work?
+ Can u pls post an example of mine script that would work?
Reply


Messages In This Thread
Else error?! - by max007 - 07.02.2009, 09:17
Re: Else error?! - by Extremo - 07.02.2009, 09:33
Re: Else error?! - by max007 - 07.02.2009, 09:43
Re: Else error?! - by max007 - 07.02.2009, 09:46
Re: Else error?! - by Extremo - 07.02.2009, 15:10
Re: Else error?! - by Nero_3D - 07.02.2009, 15:58
Re: Else error?! - by Extremo - 07.02.2009, 19:47
Re: Else error?! - by max007 - 07.02.2009, 20:11
Re: Else error?! - by max007 - 07.02.2009, 20:40
Re: Else error?! - by max007 - 07.02.2009, 20:44

Forum Jump:


Users browsing this thread: 1 Guest(s)