I redid my unread command so it listed the author of the last
note. I know it's probably a little sloppy but here is the
function:
char *last_post(CHAR_DATA *ch, NOTE_DATA *spool)
{
char buf[MAX_STRING_LENGTH];
NOTE_DATA *pnote;
for (pnote = spool; pnote != NULL; pnote = pnote->next )
if (is_note_to( ch, pnote ) )
strcpy( buf, pnote->sender );
if ( buf[0] == '\0' )
strcpy( buf, "No posts.");
return str_dup(buf);
}
Now the problem is that when you type unread, you get random
strings in place of the author's name. I've seen strings like
the last person to login, to "1m's magic misses you." It's
really bizarre. What am I doing wrong?
=====
-Matt Foltz
[Neoterra MUD] telnet://neoterra.is-a-geek.com:4000
[Car Audio Resources homepage] http://www.car-audio.net
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com