New zone command (possible code question?)

From: David Blocher (dblocher@postoffice.ptd.net)
Date: 06/01/96


Well I decided to add a new zone command that would check if a mob or object
was loaded in a particular room.  So I wrote seperate functions for mob and
obj.  My mob function appears to work fine. But the obj function dos not
evaluate properly. I figure i am using contents and next contents properly.
here is the fuction:

int  check_room_obj(int room, int obj){  
struct obj_data *i;
  int j = 0;
  for (i = world[real_room(room)].contents; i && (j <= number); i
=i->next_content)
    if (obj == GET_OBJ_VNUM(i))          
      return 1;
  return 0;
}

Note room and obj are vnums
And the object in question is in the room not in somebodys inventory..
Any suggestions would be greatly appreciated.
Vain
***************************************************************
David Blocher                       E-mail:
"In Search of Dead Solid Perfect"   dblocher@prolog.net
***************************************************************



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