News:

Come Chat with us live! Learn how HERE!

Main Menu

Percent symbol (%)?

Started by Paradox, June 02, 2007, 11:57:00 PM

Paradox

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?

∧OMG ENTROPY∧

kevlarman

Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

Paradox

Still prints dots.

This isnt in code, this is from the in game chat or console.

∧OMG ENTROPY∧

David

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?
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

kevlarman

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.
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

Paradox

I am talking about things like chat, as if saying something like this [h]Smartguy: Guys, we need 66% to pass a vote

∧OMG ENTROPY∧

TinMan

That's not a font, it's the character map. Don't know why it doesn't show, "s don't either.
Linux: ~/.tremulous/base/
Mac: ~/Library/Application\ Support/Tremulous/base/
Windows: C:\Documents and Settings\username\Local Settings\Application Data\Tremulous\base\

NeonPulse
http://neonpulse.net/media/games/tremulous/base/autoexec.cfg

kevlarman

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.
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

Glunnator

I DEMAND the font to be finished in the next version. >:[

Quote from: (Cebt)GlunnatorHAVE FUN PPL, IT'S THE MEANING OF LIFE TO LOOK AT THE BRIGHT SIDE OF IT! ;)

Paradox

Yes, but i have tried all kinds of syntaxes to get percents to print, including %%, \%, etc.

∧OMG ENTROPY∧

_Equilibrium_

i just want to be able to use quotes.

TinMan

use two single ones in a row, lol ' ' without the space.
Linux: ~/.tremulous/base/
Mac: ~/Library/Application\ Support/Tremulous/base/
Windows: C:\Documents and Settings\username\Local Settings\Application Data\Tremulous\base\

NeonPulse
http://neonpulse.net/media/games/tremulous/base/autoexec.cfg

kevlarman

Quote from: ParadoxYes, 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 .
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

doomagent13

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.
//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.


next_ghost

:roll: src/qcommon/msg.c:
// translate all fmt spec to avoid crash bugs
if ( c == '%' ) {
c = '.';
}
If my answer to your problem doesn't seem helpful, it means I won't help you until you show some effort to fix your problem yourself!
1.2.0 release's been delayed for 5:48:00 already because of stupid questions.


n00b pl0x

Quote from: next_ghost:roll: src/qcommon/msg.c:
// translate all fmt spec to avoid crash bugs
if ( c == '%' ) {
c = '.';
}

\o/
will sort out my sig, or I will get banned.

HOW DO I SORTED SIG?

Somethief

äöåœñðŋđ↓→ðšŋj←þ®↓ŋđññħđŋħđŋħ !

Edit: Yes those really were from my keyboard

n00b pl0x

get your devilmagic out of this thread somethief!
will sort out my sig, or I will get banned.

HOW DO I SORTED SIG?

Somethief

Quote from: n00b pl0xget your devilmagic out of this thread somethief!

jŋ←ø→šđĸ®→€→œjß©ĸłħßłĸ©"ħð®þħñ®€ -> you're doomed

Edit: Ok. Now I need those letters in trem, somebody fix it!

Ceaser342

- ◘ öGƒ*ß‼5*☻4+74à¥♥Ω¶

I winzor.

I too wondered why percents wouldn't show...

Evlesoa

its not just percent tho... and percent DOES seem to work in voting? Or am I wrong?

AKAnotu

˚∆˙©ƒ∂ßåœ∑´®†¥¨ˆøπ"'≥≤µ˜∫√ç≈Ω

TinMan

Linux: ~/.tremulous/base/
Mac: ~/Library/Application\ Support/Tremulous/base/
Windows: C:\Documents and Settings\username\Local Settings\Application Data\Tremulous\base\

NeonPulse
http://neonpulse.net/media/games/tremulous/base/autoexec.cfg