On Wed, 4 Dec 1996, JTRhone wrote: > > 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 Doh... he's right... :P. That should be next_in_room for both of them. Alvoria MUD -- "..." Address -- telnet://conan.ids.net:4000/ Homepage -- http://users.ids.net/~mudguy/ (under construction, perhaps not even updated for months to come) +-----------------------------------------------------------+ | 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