Re: Emblamer (?) was Re: [Admin] Snippets Site

From: JTRhone (ujtr@lady.cs.sunyit.edu)
Date: 12/04/96


>  - mendar
> 
> /* start of the proc stuff... */
> 
> int get_people_room(int room)
> {
>   struct char_data *person;
>   int i=0;
> 
>   for(person=world[room].people ; person; person=person->next)
>     {
>       if(person)
>         i++;
>     }
.../snip/...
>   for(person=world[room].people; i; person=person->next)
>    {
>      i--;
>    }
>        
>   return person;
> }
> 

Just a quick note:
These two for loops will start at person and traverse the character_list
LL.  I think the intention is to traverse the people list in a given room,
so the increments should be person = person->next_in_room.

vall aka jtrhone roa


+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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