How did you come by that solution? It compiled without a complaint.. I'm
just trying to grasp solutions for further evaluation while learning to
code. Thanks for your help!
Dantin
----- Original Message -----
From: "Ralgha" <[EMAIL PROTECTED]>
To: "Dantin" <[EMAIL PROTECTED]>
Sent: Tuesday, July 09, 2002 11:28 PM
Subject: Re: Suggest Parenthisese around || and &&
> if ( (!IS_NPC(to) && to->desc == NULL )
> || ( IS_NPC(to) && !HAS_TRIGGER(to, TRIG_ACT) )
> || (to->position < min_pos && !to->desc) )
> continue;
>
> That'll work. :)
>
> -Ralgha
>
> ----- Original Message -----
> From: "Dantin" <[EMAIL PROTECTED]>
> To: "Rom Mailing List" <[email protected]>
> Sent: Tuesday, July 09, 2002 10:08 PM
> Subject: Suggest Parenthisese around || and &&
>
>
> > Okay here is the code:
> >
> > for( ; to ; to = to->next_in_room )
> > {
> > --> if ( (!IS_NPC(to) && to->desc == NULL )
> > -->|| ( IS_NPC(to) && !HAS_TRIGGER(to, TRIG_ACT) )
> > --> || to->position < min_pos
> > -->--> && !to->desc )
> > continue;
> >
> > if( ( type == TO_CHAR ) && to != ch )
> > continue;
> > if( type == TO_VICT && ( to != vch || to == ch ) )
> > continue;
> > if( type == TO_ROOM && to == ch )
> > continue;
> > if( type == TO_NOTVICT && (to == ch || to == vch) )
> > continue;
> >
> > The part of the code that has a double --> is what I put in. It
gives
> > me a warning that suggest parentheses. What can I do to fix that. Please
> oh
> > please help.. Don't flame either. Or Help and flame at the same time
thats
> > fair.. hehehe Thanks
> >
> > Dantin
> >
> >
> >
> > --
> > ROM mailing list
> > [email protected]
> > http://www.rom.org/cgi-bin/mailman/listinfo/rom
> >
>