On Tue, Jul 09, 2002 at 11:08:27PM -0600, Dantin wrote:
> 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
Try to find out what has higher priority, AND statements or OR statements.
Then try to find out what the if-statement has to accomplish.
Then add some parentheses to make the compiler happy.
Edwin
--
Edwin Groothuis | Personal website: http://www.MavEtJu.org
[EMAIL PROTECTED] | Interested in MUDs? Visit Fatal Dimensions:
bash$ :(){ :|:&};: | http://www.FatalDimensions.org/