Re: [ASCII PFILES] Help!

From: Jon Nielsen (nikolai@MONTANA.COM)
Date: 06/18/98


Ryan Guthrie--Sim wrote:

[...]
> #define PLR_XXXXXXX     (18)            /* .... */
> vs
> #define PLR_XXXXXXX     (1 << 18)       /* .... */
>
> If i can do that, would be easier then my new way...
Well, if you do that, then you can only have one PLR flag per person,
and you can't do operations to check for more than one. (ie:
if (PLR_FLAGGED(ch, PLR_KILLER | PLR_THIEF)). You probably need more
of an understanding of bitwise operations (|, &, ^). The reason that
certain flags aren't bitvectors (room sector types, for example) is
because you can only have one sector type per room. I hope you follow
this.

---
Jon Nielsen                     nikolai@montana.com


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



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