Welcome to the Builder Academy

Question syslog error adding new wear slot

More
11 Oct 2021 14:08 #9949 by soth
Looking through the syslog the other day I came across several of these errors.  They are all related to the dual wield slot I added in, although I followed Rumble's guide and everything seems to work like it should.  I did go into that vnum and add TAKE WIELD DUALWIELD for the flags.  I would assume the object should be able to be wielded in primary hand or off hand?

Thanks!
Code:
30 Oct 10 19:33:56 2021 :: SYSERR: Object #3020 (a dagger) has unknown object wear flag, bit 15 (0 through 14 known).  31 Oct 10 19:33:56 2021 :: SYSERR: Object #3020 (a dagger) has unknown object wear flag, bit 32 (0 through 14 known).  32 Oct 10 19:33:56 2021 :: SYSERR: Object #3020 (a dagger) has unknown object wear flag, bit 45 (0 through 14 known).  33 Oct 10 19:33:56 2021 :: SYSERR: Object #3020 (a dagger) has unknown object wear flag, bit 47 (0 through 14 known).

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

More
12 Oct 2021 02:05 #9950 by soth
Well after digging around I found the method in db.c under check_bitvector_names

Still not sure why my extra wear_flag is tripping this.

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

More
12 Oct 2021 20:03 #9952 by thomas
Have you added it in constants.c as well?

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

More
12 Oct 2021 20:16 #9953 by soth
Code:
<constants.c> file 413 /** Describes the wear flags set on an item. 414  * @pre Must be in the same order as the defines. 415  * Must end array with a single newline. */ 416 const char *wear_bits[] = { 417   "TAKE", 418   "FINGER", 419   "NECK", 420   "BODY", 421   "HEAD", 422   "LEGS", 423   "FEET", 424   "HANDS", 425   "ARMS", 426   "SHIELD", 427   "ABOUT", 428   "WAIST", 429   "WRIST", 430   "WIELD", 431   "HOLD", 432   "DUALWIELD" 433   "\n" 434 };
Code:
<act.item.c> 1240 static void perform_wear(struct char_data *ch, struct obj_data *obj, int where) 1241 { 1242   /* 1243    * ITEM_WEAR_TAKE is used for objects that do not require special bits 1244    * to be put into that position (e.g. you can hold any object, not just 1245    * an object with a HOLD bit.) 1246    */ 1247 1248   int wear_bitvectors[] = { 1249     ITEM_WEAR_TAKE, 1250     ITEM_WEAR_FINGER, 1251     ITEM_WEAR_FINGER, 1252     ITEM_WEAR_NECK, 1253     ITEM_WEAR_NECK, 1254     ITEM_WEAR_BODY, 1255     ITEM_WEAR_HEAD, 1256     ITEM_WEAR_LEGS, 1257     ITEM_WEAR_FEET, 1258     ITEM_WEAR_HANDS, 1259     ITEM_WEAR_ARMS, 1260     ITEM_WEAR_SHIELD, 1261     ITEM_WEAR_ABOUT, 1262     ITEM_WEAR_WAIST, 1263     ITEM_WEAR_WRIST, 1264     ITEM_WEAR_WRIST, 1265     ITEM_WEAR_WIELD, 1266     ITEM_WEAR_TAKE, 1267     ITEM_WEAR_DUALWIELD 1268   }; 1269
Code:
<structs.h>  356 #define WEAR_LIGHT      0  /**< Equipment Location Light */  357 #define WEAR_FINGER_R   1  /**< Equipment Location Right Finger */  358 #define WEAR_FINGER_L   2  /**< Equipment Location Left Finger */  359 #define WEAR_NECK_1     3  /**< Equipment Location Neck #1 */  360 #define WEAR_NECK_2     4  /**< Equipment Location Neck #2 */  361 #define WEAR_BODY       5  /**< Equipment Location Body */  362 #define WEAR_HEAD       6  /**< Equipment Location Head */  363 #define WEAR_LEGS       7  /**< Equipment Location Legs */  364 #define WEAR_FEET       8  /**< Equipment Location Feet */  365 #define WEAR_HANDS      9  /**< Equipment Location Hands */  366 #define WEAR_ARMS      10  /**< Equipment Location Arms */  367 #define WEAR_SHIELD    11  /**< Equipment Location Shield */  368 #define WEAR_ABOUT     12  /**< Equipment Location about body (like a cape)*/  369 #define WEAR_WAIST     13  /**< Equipment Location Waist */  370 #define WEAR_WRIST_R   14  /**< Equipment Location Right Wrist */  371 #define WEAR_WRIST_L   15  /**< Equipment Location Left Wrist */  372 #define WEAR_WIELD     16  /**< Equipment Location Weapon */  373 #define WEAR_HOLD      17  /**< Equipment Location held in offhand */  374 #define WEAR_DUALWIELD 18  /**< Equipment Location held in offhand */  375 #define NUM_WEARS      19  /**< Total Number of Wear Locations */   Later down in structs.h file.  405 /* Take/Wear flags: used by obj_data.obj_flags.wear_flags */  406 #define ITEM_WEAR_TAKE       0   /**< Item can be taken */  407 #define ITEM_WEAR_FINGER     1   /**< Item can be worn on finger */  408 #define ITEM_WEAR_NECK       2   /**< Item can be worn around neck */  409 #define ITEM_WEAR_BODY       3   /**< Item can be worn on body */  410 #define ITEM_WEAR_HEAD       4   /**< Item can be worn on head */  411 #define ITEM_WEAR_LEGS       5   /**< Item can be worn on legs */  412 #define ITEM_WEAR_FEET       6   /**< Item can be worn on feet */  413 #define ITEM_WEAR_HANDS      7   /**< Item can be worn on hands */  414 #define ITEM_WEAR_ARMS       8   /**< Item can be worn on arms */  415 #define ITEM_WEAR_SHIELD     9   /**< Item can be used as a shield */  416 #define ITEM_WEAR_ABOUT     10   /**< Item can be worn about body */  417 #define ITEM_WEAR_WAIST     11   /**< Item can be worn around waist */  418 #define ITEM_WEAR_WRIST     12   /**< Item can be worn on wrist */  419 #define ITEM_WEAR_WIELD     13   /**< Item can be wielded */  420 #define ITEM_WEAR_HOLD      14   /**< Item can be held */  421 #define ITEM_WEAR_DUALWIELD 15   /**< Item can be dual wielded */  422 #define NUM_ITEM_WEARS      16   /**< Total number of wears */  423

I'm probably missing something simple, sometimes you just need another set of eyes looking at the code.




 

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

More
12 Oct 2021 20:32 - 12 Oct 2021 20:33 #9954 by thomas
Now that I reexamine your output - what _is_ going on here?
What does stat obj dagger give you? And what is in the 30.obj file?
Last edit: 12 Oct 2021 20:33 by thomas.

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

More
12 Oct 2021 20:40 #9955 by soth
Hey Thomas.
First is the stat object.
Code:
Name: 'a dagger', Keywords: dagger VNum: [ 3020], RNum: [ 587], Idnum: [30000063], Type: WEAPON, SpecProc: None L-Desc: 'A dagger with a long thin blade is here.' A-Desc: '<None>' Can be worn on: TAKE WIELD DUALWIELD Set char bits : NOBITS Extra flags : ANTI_CLERIC Weight: 1, Value: 10, Cost/day: 10, Timer: 0, Min level: 1 In room: 65535 (Nowhere), In object: None, Carried by: Soth, Worn by: Nobody Todam: 1d4, Avg Damage: 2.5. Message type: pierce Affections: None Triggers: None.

<30.obj> file
Code:
#3020 dagger~ a dagger~ A dagger with a long thin blade is here.~ ~ 5 n 0 0 0 anp 0 0 0 0 0 0 0 0 1 4 11 1 10 10 1 0

<errors> file
Code:
4962 Oct 12 09:44:08 2021 :: SYSERR: Object #3020 (a dagger) has unknown object wear flag, bit 15 (0 through 14 known). 4963 Oct 12 09:44:08 2021 :: SYSERR: Object #3020 (a dagger) has unknown object wear flag, bit 32 (0 through 14 known). 4964 Oct 12 09:44:08 2021 :: SYSERR: Object #3020 (a dagger) has unknown object wear flag, bit 45 (0 through 14 known). 4965 Oct 12 09:44:08 2021 :: SYSERR: Object #3020 (a dagger) has unknown object wear flag, bit 47 (0 through 14 known). 4966 Oct 12 09:44:08 2021 :: SYSERR: Object #3021 (a small sword) has unknown object wear flag, bit 15 (0 through 14 known). 4967 Oct 12 09:44:08 2021 :: SYSERR: Object #3021 (a small sword) has unknown object wear flag, bit 32 (0 through 14 known). 4968 Oct 12 09:44:08 2021 :: SYSERR: Object #3021 (a small sword) has unknown object wear flag, bit 45 (0 through 14 known). 4969 Oct 12 09:44:08 2021 :: SYSERR: Object #3021 (a small sword) has unknown object wear flag, bit 47 (0 through 14 known).

Seems as though each object I have set the DUALWIELD flag on generates errors, however it seems to function like it should in the game with the testing i've done so far. Need anything else i'll be happy to provide.

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

Time to create page: 0.208 seconds