Re: [code] [prob]

From: Rasmus 'Con' Ronlev (raro94ab@hp4.econ.cbs.dk)
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.

Regards,
Con

d.
--
     Rasmus Rønlev DOEK'94      WWW: http://www.econ.cbs.dk/people/raro94ab
     Student instructor         MUD: exiled.mud.circlemud.org 5000
                                         199.199.16.100 5000
       Student, B.Sc in Computer Science and Business Administration.

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



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