Re: [CODE] [HELP] <INVALID BITVECTOR>

From: Curtiss Cicco (1CMC3466@ibm.MtSAC.edu)
Date: 10/03/96


On Thu, 3 Oct 1996 14:56:00 -0700 you said:
>I keep getting <INVALID BITVECTOR> popping up in affects, room flags and
>such, and it only affects with the (1 << 31) flags.  The flags themselves
>seem to work (My ROOM_NOJUNK does work and it is (1 <<32))  Is there any
>way to get these things to show up?  I wanna SEE the bitvectors.  (and
>don't suffest a MOB2_ set...that's out of the question....I am NOT editing
>the mob files AGAIN)
>
   Using (1 << 31) on an int or a long will and in your case is breaking
the sprintbit call in utils.c because the bitvector it is getting passed
is probably a -2147483648. In sprintbit if a bitvector is < 0 it's to
return the '<INVALID BITVECTOR>' string. A solution to this would be to
change the datatype of the variable holding the bitvector to an unsigned
int. In the case of (1 << 32) you may have no choice but to create another
bitfield.

-- Curtiss
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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