Re: PLR Flag Maximum

From: Angus Mezick (amezick@edgil.com)
Date: 01/07/00


Mike,
Think about three things:
1) How many bits ar in an int?
  (hint 2^5)
2) How does bit shifting work?
  (hint (1 << 3) = 00000000 0000000 00000000 00001000)
3) What happens when you go too far to the left?
  (hint (1 << 32) = 1 00000000 00000000 00000000 00000000)

Good Luck
--Angus

PS. You might want to think about either the 128bit patch or
creating a PLR2_FLAGS variable that can be used for the same
purpose as the PRL_FLAGS variable.  Don't forget to add this
to do_stat_char and grep around to code for PLR_FLAGS and
the actual name of the variable to see where else you would
need to add code.

Michael Gallagher wrote:
>
> I put in some new PLR flags recently and i can't get them to set.
>
> they are defined as follows
>
> #define PLR_LOCATE      (1 << 32)
> #define PLR_BREACH      (1 << 33)
> #define PLR_IMMOBILE    (1 << 34)
>
> and i can't get any of them to set. So im wondering if i've gone over
> the max number of bitvectors for PLR. I was using
>
> SET_BIT(PLR_FLAGS(d->character), PLR_LOCATE);
>
> and none of these flags set.
>
> Any help would be appreciated.
> Tanks
> Michael Gallagher

--
Angus Mezick                                    Edgil Assoc.
PH:978-251-9932                                 15 Tyngsboro Rd
FX:978-251-9970                                 N. Chelmsford MA 01863-1344
amezick@edgil.com

Photons have neither morals nor visas.


     +------------------------------------------------------------+
     | 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 : 04/10/01 PDT