On Fri, 21 Jun 1996, Mike Donais. wrote: > 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) { the first argument in get_char_room is the name it's looking for, you're sending it the vnum of them mob... > handler.c:struct char_data *get_char_room(char *name, int room)
This archive was generated by hypermail 2b30 : 12/18/00 PST