View Single Post
Old 02-12-2007, 12:56 PM   #9 (permalink)
Storm33229
Forum Expert
 
Join Date: Jul 2003
Location: Arizona
Age: 18
Posts: 3,186
Send a message via AIM to Storm33229 Send a message via Yahoo to Storm33229
Default

Code:
if( ((from != null) || (from.Map != Map.Internal)) || (!from.Deleted) )
{
    //action code
}
and
Code:
if( from != null )
{
    if( from.Map != Map.Internal )
    {
        if( !from.Deleted )
        {
            //action code
        }
    }
}
are two completely different things.
The first one performs the action code if: from is not null, or if map is not internal or if from is not deleted.

However, the second one:
If from isn't null check if the map is internal, if not: check if from is not deleted.

For both of them to be the same the first one needs to be changed to:
Code:
if((from != null) && (from.Map != Map.Internal) && (!from.Deleted))
{
//action code
}
-Storm
__________________
Quote:
Originally Posted by Radwen
You should crush your pills and sniff them.
Storm33229 is offline   Reply With Quote