The people member of the room_data struct is a pointer to struct char_data, not an integer count of the number of people in the room. Do you want there to be no other player's in the room, or do you need there to be no mobs as well? Anyway, you would have to do something like: int counter; counter = 0; for (tch = world[ch->in_room].people; tch; tch = next_tch) { next_tch = tch->next_in_room; if (tch != NULL) counter++; } if (counter == 0) { /* then do stuff */ } --- eglamkowski@angelfire.com http://www.angelfire.com/nj/eglamkowski Check out my webring: http://www.angelfire.com/nj/eglamkowski/null.html "Guns cause violence like flies cause garbage." -Rich Loether On Sun, 16 Aug 1998 03:07:42 Christoffer Lundberg wrote: >Is this a valid thing to write? It sure doesn't work anyways. > >if (world[ch->in_room].people == 0) { > > >I want to make sure that there are absolutely no other >chars present in that room, and something will happen. > >What can I substitute for this? Angelfire for your free web-based e-mail. http://www.angelfire.com +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST