Re: [Code] do_set - name changing and log output.

From: Templar Viper (templarviper@hotmail.com)
Date: 12/12/02


> Actually I pretty much know sprintf backwards, forwards, sideways, up and
> down, and inside out. The code wasn't done by me originally and the mud
> source isn't my own.  I'm helping out a relative whom also runs a MUD
> project, she lost both her coders and it pretty much screwed her royally
so
> soon to the second opening of a newer version of her very old mud. My
> original question stands, is there a more efficient and less time
consuming
> way to display the old name, new name and actor's name in a syslog string?
>
> sprintf(logbuf, "(GC) %s has changed %s's name to ....", GET_NAME(ch),
> GET_NAME(vict));
> /* GET_NAME(vict) should probably be GET_OLDNAME(vict) */
>
> sprintf(logbuf, "(GC) %s has changed the name of %s to %s.",
> GET_NAME(ch),GET_OLDNAME(vict), GET_NAME(vict));

Why not print GET_NAME(ch) into a buffer before the name is changed,
and print it into the logbuf afterwards. Or was that what you were trying to
do?

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT