Re: [code] [prob]

From: Rasmus 'Con' Ronlev (
Date: 10/23/96

On Wed, 23 Oct 1996 mch@GLADSTONE.UOREGON.EDU wrote:

> Okie I am trying to put in a whois command that will display race and
>         sprintf(buf, "%sLevel %d %s\r\n", buf, GET_LEVEL(victim),
                        ^^->remove that %s  ^^^-> remove the buf here!
> Hope you peoples can help.

Heh, it might seem to be a little tweaky, but what the above piece of
sprintf actually does is to add whats currently in buf at the front of the
string you print! You should only use the "%s....",buf thing if you want
the previous stuff in buf to be 'preserved' in this buf string, which in
this case you don't... Did this amke some sense ?? Hope it did.


     Rasmus Rønlev DOEK'94      WWW:
     Student instructor         MUD: 5000
       Student, B.Sc in Computer Science and Business Administration.

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

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