Welcome to the Builder Academy

Question what is wrong here:

More
19 May 2018 19:15 #8076 by JTP
what is wrong here: was created by JTP
Code:
act.informative.c int single(struct obj_data *o) { if (IS_SET(GET_OBJ_WEAR(o), ITEM_WEAR_HANDS) || IS_SET(GET_OBJ_WEAR(o), ITEM_WEAR_FEET) || IS_SET(GET_OBJ_WEAR(o), ITEM_WEAR_LEGS) || IS_SET(GET_OBJ_WEAR(o), ITEM_WEAR_ARMS)) return(FALSE); return(TRUE); } act.informative.c:171: error: invalid operands to binary & act.informative.c:172: error: invalid operands to binary & act.informative.c:173: error: invalid operands to binary & act.informative.c:174: error: invalid operands to binary & make[1]: *** [act.informative.o] Error 1

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

More
19 May 2018 21:10 #8077 by thomas
Replied by thomas on topic what is wrong here:
Because ITEM_WEAR_x aren't bitvectors already, you'll need to use IS_SET_AR instead of IS_SET.

But here, I'd just replace it with:
Code:
int single(struct obj_data *o) { if (OBJWEAR_FLAGGED(o, ITEM_WEAR_HANDS) || OBJWEAR_FLAGGED(o, ITEM_WEAR_FEET) || OBJWEAR_FLAGGED(o, ITEM_WEAR_LEGS) || OBJWEAR_FLAGGED(o, ITEM_WEAR_ARMS)) return(FALSE); return(TRUE); }

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

More
19 May 2018 21:51 #8078 by JTP
Replied by JTP on topic what is wrong here:
Thanks Thomas works like a charm

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

Time to create page: 0.196 seconds