Re: [Newbie]Special character(%)

From: Tony Robbins (
Date: 07/10/01

Quoting "Patrick M. O'Laughlin" <pmolaughlin@HOME.COM>:

> > How do you use special characters, like '%' in CircleMUD?
> Use: \%

Actually, I believe he's talking about using % in a
string via sprintf(), which isn't really CircleMUD
specific, but neither is usage of % in general, unless
he's added some color snippet that uses it as the
indicator for color.

Anyway, if you're in a situation where you're trying to
do this:

sprintf(buf, "100%");

(ignoring the fact that you wouldn't do that like so),
you will want to simply double the % sign:

sprintf(buf, "100%%");

A C issue, or a printf issue.  An obligatory 'buy a C
book' statement goes here, if I've correctly diagnosed
the issue.

Also note that you should've probably provided an
example of where you were running into the problem.

End help and lecture.



   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/06/01 PST