Tremulous Forum

General => General Discussion => Topic started by: Paradox on June 02, 2007, 11:57:00 pm

Title: Percent symbol (%)?
Post by: Paradox on June 02, 2007, 11:57:00 pm
The font that tremulous uses has a % symbol in it, and it should parse properly. But when you type it in a message and send it to the server, it prints as a . (period). While your typing it, it renders properly. Any reason why?
Title: Percent symbol (%)?
Post by: kevlarman on June 03, 2007, 12:12:57 am
http://www.cplusplus.com/reference/clibrary/cstdio/printf.html
Title: Percent symbol (%)?
Post by: Paradox on June 03, 2007, 12:21:29 am
Still prints dots.

This isnt in code, this is from the in game chat or console.
Title: Percent symbol (%)?
Post by: David on June 03, 2007, 12:24:16 am
So if you want a % you have to do %%?
or is it the server is smart and switches the % for .?
if so, why not switch for %%, or some random non-printing char, that it can then switch back?
Title: Percent symbol (%)?
Post by: kevlarman on June 03, 2007, 12:42:04 am
you can't replace % with %% because %% is twice as big as you have space for, you can't replace it with a special char and switch it back later because parts of tremulous use the system's printf implementation, and you can't trivially replace it.
Title: Percent symbol (%)?
Post by: Paradox on June 03, 2007, 12:58:22 am
I am talking about things like chat, as if saying something like this [h]Smartguy: Guys, we need 66% to pass a vote
Title: Percent symbol (%)?
Post by: TinMan on June 03, 2007, 01:08:35 am
That's not a font, it's the character map. Don't know why it doesn't show, "s don't either.
Title: Percent symbol (%)?
Post by: kevlarman on June 03, 2007, 01:09:31 am
and the text from your chat passes through various forms of printf more times than i can easily count before it shows up on your screen.
Title: Percent symbol (%)?
Post by: Glunnator on June 03, 2007, 09:03:01 am
I DEMAND the font to be finished in the next version. >:[
Title: Percent symbol (%)?
Post by: Paradox on June 03, 2007, 08:10:07 pm
Yes, but i have tried all kinds of syntaxes to get percents to print, including %%, \%, etc.
Title: Percent symbol (%)?
Post by: _Equilibrium_ on June 03, 2007, 09:42:05 pm
i just want to be able to use quotes.
Title: Percent symbol (%)?
Post by: TinMan on June 03, 2007, 10:08:27 pm
use two single ones in a row, lol ' ' without the space.
Title: Percent symbol (%)?
Post by: kevlarman on June 03, 2007, 11:19:23 pm
Quote from: "Paradox"
Yes, but i have tried all kinds of syntaxes to get percents to print, including %%, \%, etc.
because of technical restrictions, you can't use % in chat at all, it will _always_ be replaced with a .
Title: Percent symbol (%)?
Post by: doomagent13 on June 04, 2007, 12:56:16 am
Probably due to the way in which strings get specific things put in the middle of them.  In the code, there are many uses of %s.
Code: [Select]
//random example
trap_SendConsoleCommand(EXEC_APPEND, va("cp \"^1TEST ^7%s\"\n", "^1ALPHA"));

would print "TEST ALPHA" in the middle of every clients screen. (I think)

 :D Go complain to TJW or some other dev, but dont expect anything to get done about it.
Title: Percent symbol (%)?
Post by: PFB on June 04, 2007, 12:58:11 am
\% ?
Title: Percent symbol (%)?
Post by: next_ghost on June 04, 2007, 01:32:58 pm
:roll: src/qcommon/msg.c:
Code: [Select]
// translate all fmt spec to avoid crash bugs
if ( c == '%' ) {
c = '.';
}
Title: Percent symbol (%)?
Post by: DASPRiD on June 04, 2007, 02:53:56 pm
Oh well, so just a lazy workaround :roll:
Title: Percent symbol (%)?
Post by: n00b pl0x on June 05, 2007, 04:31:18 am
Quote from: "next_ghost"
:roll: src/qcommon/msg.c:
Code: [Select]
// translate all fmt spec to avoid crash bugs
if ( c == '%' ) {
c = '.';
}


\o/
Title: Percent symbol (%)?
Post by: Somethief on June 09, 2007, 10:57:20 pm
äöåœñðŋđ↓→ðšŋj←þ®↓ŋđññħđŋħđŋħ !

Edit: Yes those really were from my keyboard
Title: Percent symbol (%)?
Post by: n00b pl0x on June 09, 2007, 11:15:31 pm
get your devilmagic out of this thread somethief!
Title: Percent symbol (%)?
Post by: Somethief on June 09, 2007, 11:23:26 pm
Quote from: "n00b pl0x"
get your devilmagic out of this thread somethief!


jŋ←ø→Å¡đĸ®→€→Å“jß©ĸłħßłĸ©“ħð®þħñ®€ -> you're doomed

Edit: Ok. Now I need those letters in trem, somebody fix it!
Title: Percent symbol (%)?
Post by: Ceaser342 on June 09, 2007, 11:50:36 pm
- ◘ öGÆ’*ß‼5*☻4+74à¥♥Ω¶

I winzor.

I too wondered why percents wouldn't show...
Title: Percent symbol (%)?
Post by: Evlesoa on June 10, 2007, 01:12:26 am
its not just percent tho... and percent DOES seem to work in voting? Or am I wrong?
Title: Percent symbol (%)?
Post by: AKAnotu on June 10, 2007, 02:26:23 am
˚∆˙©ƒ∂ßåœ∑´®†¥¨ˆøπ“‘≥≤µ˜∫√ç≈Ω
Title: Percent symbol (%)?
Post by: TinMan on June 10, 2007, 03:20:15 am
UNICODE TREM! LAWL