--- Michael Barton <[EMAIL PROTECTED]> wrote:
> 
> ch->next_in_room = NULL;
> if (!pRoomIndex->people)
>   pRoomIndex->people = ch;
> else
> {
>   CHAR_DATA *tmpch = pRoomIndex->people;
>   while (tmpch->next_in_room); // find the last char in the room
>   tmpch->next_in_room = ch; // make ch the next one
> }

Pretty good, but you need to advance the tmpch pointer in your loop, so it
should probably be more like:
...
else
{
    CHAR_DATA * tmpch = pRoomIndex->people;
    while(tmpch->next_in_room)
        tmpch = tmpch->next_in_room;
    tmpch->next_in_room = ch;
}

=====
-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GCS/L/C/O d-(+) s++: a-- C+++$>++++ UBLS++++$ 
P+++(--)$ L+++>++++ E--- W+>++$ N !o K? w(--) !O 
M- !V PS+ PE(++) Y+ PGP->+ t+ 5 X+() R(+) tv+@ 
b++(+++) !DI+++ D G(-) e>+++$ h---() r+++ y+++
------END GEEK CODE BLOCK------

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Reply via email to