Re: Daniel's do_who and races

From: David Wiklund (mathrim@HEM1.PASSAGEN.SE)
Date: 03/13/98


>sprintf(Mort_buf, "%s[%2d %s %s] %s %s", Mort_buf, GET_LEVEL(wch),
>              GET_RACE(wch), CLASS_ABBR(wch), GET_NAME(wch),
>              GET_TITLE(wch));
>
>or like so:
>
>sprintf(Mort_buf, "%s[%2d %s %s] %s %s", Mort_buf, GET_LEVEL(wch),
>              ((wch)->player.race), CLASS_ABBR(wch), GET_NAME(wch),
>              GET_TITLE(wch));
>
>act.informative.c:1045: warning: format argument is not a pointer
> (arg 5)

What is here is that he complaints that you try to write a char/or int as string...
If you do it like this it will type correctly but you will only get the abbrivations..

Add this at the top ex. just below extern char "class_abrevs[];

extern char *race_abbrevs[];

sprintf(Mort_buf, "%s[%2d %s %s] %s %s", Mort_buf, GET_LEVEL(wch),
              RACE_ABBR(wch), CLASS_ABBR(wch), GET_NAME(wch),
              GET_TITLE(wch));

Well that works for me...

        YT 7David Wiklund


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



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