what is wrong here:

  • JTP
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
2 years 11 months ago #8076 by JTP
what is wrong here: was created by JTP
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
2 years 11 months ago #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:
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.

  • JTP
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
2 years 11 months ago #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.079 seconds