Homer Simpson wrote:
>
> Hiya all,
> I'm trying to add hidden objects, and a search command to find
> them. Below is the code for my search command, but it doesn't compile.
> The errors it spits out are also below.
<snip>
>
> ##########
> # Errors #
> ##########
>
> act.other.c: In function 'do_search':
> act.other.c:164: invalid operands to binary &
<snip>
>
> ########
> # Code #
> ########
>
> ACMD(do_search)
> {
> byte percent;
> struct obj_data *obj;
> int roll = 20;
>
> if (IS_DARK(ch->in_room) && !CAN_SEE_IN_DARK(ch))
> send_to_char("It's too dark to search for anything!\r\n", ch);
> else if (IS_AFFECTED(ch, AFF_BLIND))
> send_to_char("Your blind, how can you search for anything?\r\n", ch);
> else {
> for (obj = world[ch->in_room].contents; obj; obj = obj->next_content) {
> if (IS_SET(obj, ITEM_HIDDEN) {
<snip>
if ITEM_HIDDEN is an obj_data.obj_flags.type_flag, then
make this line
if(IS_SET(GET_OBJ_TYPE(obj), ITEM_HIDDEN) {
-D
--
\ | /
\ /---------------------\ /
-- dkarnes@mystech.com --
/ \---------------------/ \
/ | \
+-----------------------------------------------------------+
| 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