Welcome to the Builder Academy

Question DB.c Check_bitvector_names

More
17 Apr 2020 02:27 #8636 by cunning
I am not very good with Bitwise operations and as such I have not had time to solve this. However, it happens on every single 32 bit.... AKA "F" always returns an error. No matter which parser is checking the bitvector. I validated it on a few things. If the 32 bit is present, i get an error on all bitvectors. I have included just a small subset, as stated, all "bitvectors" fail if the very last BIT is used. I tried to simulate on tbamud-2020 but i did not see anything using the last Bitvector by looking at structs.h to see what was defined.

SYSERR: room #702 has unknown room flag, bit 39 (0 through 32 known).
SYSERR: room #702 has unknown room flag, bit 42 (0 through 32 known).
SYSERR: room #702 has unknown room flag, bit 63 (0 through 32 known).
SYSERR: room #703 has unknown room flag, bit 39 (0 through 32 known).
SYSERR: room #703 has unknown room flag, bit 42 (0 through 32 known).
SYSERR: room #703 has unknown room flag, bit 63 (0 through 32 known).
SYSERR: room #704 has unknown room flag, bit 39 (0 through 32 known).
SYSERR: room #704 has unknown room flag, bit 42 (0 through 32 known).
SYSERR: room #704 has unknown room flag, bit 63 (0 through 32 known).
SYSERR: room #705 has unknown room flag, bit 39 (0 through 32 known).
SYSERR: room #705 has unknown room flag, bit 42 (0 through 32 known).
SYSERR: room #705 has unknown room flag, bit 63 (0 through 32 known).
SYSERR: room #706 has unknown room flag, bit 39 (0 through 32 known).
SYSERR: room #706 has unknown room flag, bit 42 (0 through 32 known).
SYSERR: room #706 has unknown room flag, bit 63 (0 through 32 known).
SYSERR: mob vnum 7703 has unknown mobile flag, bit 35 (0 through 34 known).
SYSERR: mob vnum 7703 has unknown mobile flag, bit 41 (0 through 34 known).
SYSERR: mob vnum 7703 has unknown mobile flag, bit 45 (0 through 34 known).
SYSERR: mob vnum 7703 has unknown mobile flag, bit 52 (0 through 34 known).
SYSERR: mob vnum 7703 has unknown mobile flag, bit 56 (0 through 34 known).
SYSERR: mob vnum 7703 has unknown mobile flag, bit 57 (0 through 34 known).
SYSERR: mob vnum 7703 has unknown mobile flag, bit 63 (0 through 34 known).

SYSERR: Object #11803 (a cloth nappy) has unknown object wear flag, bit 26 (0 through 18 known).
SYSERR: Object #11803 (a cloth nappy) has unknown object wear flag, bit 37 (0 through 18 known).
SYSERR: Object #11803 (a cloth nappy) has unknown object wear flag, bit 58 (0 through 18 known).

Please Log in or Create an account to join the conversation.

More
17 Apr 2020 02:29 #8637 by cunning
Replied by cunning on topic DB.c Check_bitvector_names
Code:
static int check_bitvector_names(bitvector_t bits, size_t namecount, const char *whatami, const char *whatbits) { unsigned int flagnum = 0; bool error = FALSE; /* See if any bits are set above the ones we know about. */ if (bits <= (~(bitvector_t) 0 >> (sizeof(bitvector_t) * 8 - namecount))) return (FALSE); for (flagnum = namecount; flagnum < sizeof(bitvector_t) * 8; flagnum++) if ((1 << flagnum) & bits) { log("SYSERR: %s has unknown %s flag, bit %d (0 through %d known).", whatami, whatbits, flagnum, (int)namecount - 1); error = TRUE; } return (error); }

Please Log in or Create an account to join the conversation.

More
17 Apr 2020 02:30 #8638 by cunning
Replied by cunning on topic DB.c Check_bitvector_names
Just an example of my Room bits.

Code:
* WARNING: In the world files, NEVER set the bits marked "R" ("Reserved") */ #define ROOM_DARK 0 //A #define ROOM_DEATH 1 //B #define ROOM_NO_MOB 2 //C #define ROOM_INDOORS 3 //D #define ROOM_NO_STORM_ENTRANCE 4 //E #define ROOM_DUMP 5 //F #define ROOM_MOVING 6 //G #define ROOM_NO_MAGIC 7 //H #define ROOM_MOB_MAGIC_ONLY 8 //I #define ROOM_PRIVATE 9 //J #define ROOM_PEACEFUL 10 //K #define ROOM_GODROOM 11 //L #define ROOM_NOCRIME 12 //M #define ROOM_CAMPSITE 13 //N #define ROOM_SOUNDPROOF 14 //O #define ROOM_BFS_MARK 15 //P (R) #define ROOM_SHADOW 16 //Q #define ROOM_MDARK 17 //R #define ROOM_NPC_DEATH 18 //S #define ROOM_OVERWHELMING_EVIL 19 //T #define ROOM_OVERWHELMING_GOOD 20 //U #define ROOM_NO_SLEEP 21 //V #define ROOM_TIMED_DT 22 //W #define ROOM_LOW_LIGHT 23 //X #define ROOM_WORLDMAP 24 //Y /**< World-map style maps here */ #define ROOM_CURRENT 25 //Z #define ROOM_NOTRACK 26 //a #define ROOM_HOUSE 27 //b #define ROOM_HOUSE_CRASH 28 //c #define ROOM_ATRIUM 29 //d #define ROOM_OLC 30 //e #define ROOM_NO_TELEPORT 31 //f #define ROOM_NOASTRAL 32 //A1

Please Log in or Create an account to join the conversation.

More
17 Apr 2020 14:17 #8639 by Rumble
Replied by Rumble on topic DB.c Check_bitvector_names
It looks like you imported World files from another MUD with room/obj flags greater than your 32/18. You would have to manually remove those higher number flags from those World files.

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com

Please Log in or Create an account to join the conversation.

More
18 Apr 2020 11:42 #8642 by cunning
Replied by cunning on topic DB.c Check_bitvector_names
I have been using the same for years... aka Jedimud.

Everything works, displays, stats, functionality. Only this check of bitvectors does not work when I use the last bitvector. In each group of 32

Please Log in or Create an account to join the conversation.

More
18 Apr 2020 13:59 #8643 by Rumble
Replied by Rumble on topic DB.c Check_bitvector_names
What is your max number of room flags set at in structs.h. It should be highest #+1.

in TBA it is:
#define NUM_ROOM_FLAGS 17

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com

Please Log in or Create an account to join the conversation.

Time to create page: 0.218 seconds