Re: Checking a number

From: Warren Robbins (
Date: 01/03/00

On Mon, 3 Jan 2000, J P wrote:

> How would you check to see if there is more than one player/mob (besides
> yourself) in the room?

Other people have posted responses, but here's one already in stock

num_pc_in_room().  Look at it (I can't get to my code ATM) and see how to
call it, and if it includes the character (if a char_data pointer is
passed to it) in the count.

If character is included:
if (num_pc_in_room(proper args) != 2)

If not:
if (num_pc_in_room(proper args) != 1)

You might want to check on this.


Tony Robbins          | Kupoppo.Net (under construction/currently down) |

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 04/10/01 PDT