Re: [newbie][code]Distinguishing between mobs and not_mobs.

From: Jess Heinig (jessh@white-wolf.com)
Date: 03/23/99


  Hmm. IS_NPC(ch) is being called on your subject, but you're sending the
string to "ch" with send_to_char. Since the string is always getting to
you, it looks like IS_NPC(ch) is being called on your looking character.
Try changing the argument of IS_NPC to the subject being looked at.
  That is:
  You call if(!IS_NPC(ch)) - it checks ch
  You send a string to ch - it goes to you
  Looks like ch is you! Since you're a player, it'll always say "Not a
mob."

Cheers,
Jess Heinig

Anthony Benjamin said:

>Ok, lets say that someone wants to distinguish between mobs and
>not_mobs...I thought you would use the IS_NPC...but with this little
>snippet of code..
>
> if(!IS_NPC(ch)){
>    send_to_char("Not a mob",ch);
>   }else{
>     send_to_char("A mob.",ch);
>    }
>
>It always assumes it is a mob and never, ever hits not_mob. Any ideas?
>Am I using the macro wrong??
>
>anthony


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST