On Mon, 10 Jun 1996, Pandion wrote:
> On Mon, 10 Jun 1996, Josh Brittenham wrote:
>
> > Hi again all, I'm adding a feature to my mud where you can kill
> > people in rooms with the room flag pkroom.... is this not a legel procedure..
> >
> > if (!ROOM_FLAGGED(ch->in_room, PKROOM)
>
> better yet....
>
> if (IS_SET(ROOM_FLAGS(ch->in_room), ROOM_PK)) etc etc
The only thing better is that you use the right number of closing
parantheses. Otherwise, ROOM_FLAGGED works just as well.
if (!ROOM_FLAGGED(ch->in_room, ROOM_PK)) {
send_to_char("No player killing is allowed in this room.\r\n", ch);
return;
}
Easy enough.
This archive was generated by hypermail 2b30 : 12/18/00 PST