Compiler warning:

From: Mike Donais. (donais@server.uwindsor.ca)
Date: 06/21/96


Hi, I am trying to add a choice to my oasis olc, I am usually fairly
competent at c, but I can't work this one out:

COMPILE WARNING:
IN: db.c IN FUNCTION: reset_zone:
db.c:1669: warning: passing arg 1 of `get_char_room' makes pointer from 
integer without a cast

I think it is fairly simple (hope), here is the code in question:
    case 'R': /* rem obj from room, built into oasis olc */
      if ((obj = get_obj_in_list_num(ZCMD.arg2, world[ZCMD.arg1].contents)) != NULL) {
        obj_from_room(obj);
        extract_obj(obj);
      }
      last_cmd = 1;
      break;

    case 'X': /* rem mob from room added by krazy, not from oasis olc*/
      /***** Next line has the error ********/
      if ((mob = get_char_room((mob_index[ZCMD.arg2].virtual), ZCMD.arg1)) != NULL) {
        char_from_room(mob);
        extract_char(mob);
      }
      last_cmd = 1;
      break;

I included case 'R' for reference, here is get_char_room defines:
handler.c:struct char_data *get_char_room(char *name, int room)
handler.h:struct char_data *get_char_room(char *name, int room);

And lastly here is a successful call od get_char_room:
  if (!(pet = get_char_room(buf, pet_room))) {

Thanks.

 -- 
Mike Donais. (BOFH) (donais@uwindsor.ca)
SOCR: Student Operated Computing Resources (http://supernova.uwindsor.ca)



This archive was generated by hypermail 2b30 : 12/18/00 PST