Re: [code] Picking a random target off a list

From: Count Zero (count.zero@panacom.com)
Date: 03/02/97


Duh.. think I caught it myself... not sure though...

>    for (rch = world[ch->in_room].people; rch; rch = rch->next_in_room)
>      if ((FIGHTING(rch) == ch) && (number(0, count++) == 0))
>       vict = FIGHTING(rch);

1st line should be:

    for (rch = world[rch->in_room].people; rch; rch = rch->next_in_room)

right?

Dunno... still a newbie....


-Count Zero-




+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
|    Or send 'info circle' to majordomo@cspo.queensu.ca     |
+-----------------------------------------------------------+



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