Re: more code

From: Niese-Petersen (
Date: 07/13/96

On Sat, 13 Jul 1996, Nick B wrote:

> ACMD(do_score)
> {  
>    struct time_info_data playing_time; 
>    struct time_info_data real_time_passed(time_t t2, time_t t1);
>    sprintf(buf, "%s                   Info for %s\r\n", buf, GET_NAME(ch));
>    sprinttype(GET_RACE(ch), pc_race_types, buf2); 
>    sprintf(buf, "%sRace: %s", buf, buf2);
>    sprinttype(GET_CLASS(ch), pc_class_types, buf2);
>    sprintf(buf, "%s                 Class: %s\r\n", buf, buf2);
>    sprintf(buf,"--------------------------------------------------\r\n");
              | Right here you redefine the value of buf, and it ignores
                what it had before. Make 'sprintf' be a 'strcat'
>    sprintf(buf, "You are %d years old.", GET_AGE(ch));
              | And again.. buf being changed.  Don't know if you wanna send
                the buf value through page_string or not.. But if not, then
                make this line right before that line:

     send_to_char(buf, ch);

> When I execute the score command within the mud, it starts printing info on
> the screen starting at the GET_AGE line.  Why won't it print anything above it?

  Hope it helped.

Erik Niese-Petersen
Aka Quint the Typo God
Realms of Darkness IMP [ 6666. Playertesting]

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