Author Topic: Percent symbol (%)?  (Read 9706 times)

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Percent symbol (%)?
« 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?

∧OMG ENTROPY∧

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok 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

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Percent symbol (%)?
« Reply #2 on: June 03, 2007, 12:21:29 am »
Still prints dots.

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

∧OMG ENTROPY∧

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Percent symbol (%)?
« Reply #3 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?
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

  • Posts: 2737
  • Turrets: +291/-295
Percent symbol (%)?
« Reply #4 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.
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok 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

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Percent symbol (%)?
« Reply #5 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

∧OMG ENTROPY∧

TinMan

  • Posts: 1019
  • Turrets: +49/-70
    • http://neonpulse.net
Percent symbol (%)?
« Reply #6 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.
Code: [Select]
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

  • Posts: 2737
  • Turrets: +291/-295
Percent symbol (%)?
« Reply #7 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.
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok 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

  • Posts: 865
  • Turrets: +5/-6
Percent symbol (%)?
« Reply #8 on: June 03, 2007, 09:03:01 am »
I DEMAND the font to be finished in the next version. >:[

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

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Percent symbol (%)?
« Reply #9 on: June 03, 2007, 08:10:07 pm »
Yes, but i have tried all kinds of syntaxes to get percents to print, including %%, \%, etc.

∧OMG ENTROPY∧

_Equilibrium_

  • Posts: 1845
  • Turrets: +96/-89
Percent symbol (%)?
« Reply #10 on: June 03, 2007, 09:42:05 pm »
i just want to be able to use quotes.

TinMan

  • Posts: 1019
  • Turrets: +49/-70
    • http://neonpulse.net
Percent symbol (%)?
« Reply #11 on: June 03, 2007, 10:08:27 pm »
use two single ones in a row, lol ' ' without the space.
Code: [Select]
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

  • Posts: 2737
  • Turrets: +291/-295
Percent symbol (%)?
« Reply #12 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 .
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok 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

  • Posts: 506
  • Turrets: +18/-18
Percent symbol (%)?
« Reply #13 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.

PFB

  • Guest
Percent symbol (%)?
« Reply #14 on: June 04, 2007, 12:58:11 am »
\% ?

next_ghost

  • Posts: 892
  • Turrets: +3/-6
Percent symbol (%)?
« Reply #15 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 = '.';
}
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.

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Percent symbol (%)?
« Reply #16 on: June 04, 2007, 02:53:56 pm »
Oh well, so just a lazy workaround :roll:
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

n00b pl0x

  • Posts: 2412
  • Turrets: +55/-168
Percent symbol (%)?
« Reply #17 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/
will sort out my sig, or I will get banned.

HOW DO I SORTED SIG?

Somethief

  • Posts: 284
  • Turrets: +1/-1
    • http://www.somethief.net/
Percent symbol (%)?
« Reply #18 on: June 09, 2007, 10:57:20 pm »
äöåœñðŋđ↓→ðšŋj←þ®↓ŋđññħđŋħđŋħ !

Edit: Yes those really were from my keyboard
url=http://fi.tremulous.net/]Tremulous Suomi[/url]
My blog

n00b pl0x

  • Posts: 2412
  • Turrets: +55/-168
Percent symbol (%)?
« Reply #19 on: June 09, 2007, 11:15:31 pm »
get your devilmagic out of this thread somethief!
will sort out my sig, or I will get banned.

HOW DO I SORTED SIG?

Somethief

  • Posts: 284
  • Turrets: +1/-1
    • http://www.somethief.net/
Percent symbol (%)?
« Reply #20 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!
url=http://fi.tremulous.net/]Tremulous Suomi[/url]
My blog

Ceaser342

  • Posts: 201
  • Turrets: +0/-0
    • http://www.operationcwalii.smfforfree.com
Percent symbol (%)?
« Reply #21 on: June 09, 2007, 11:50:36 pm »
- ◘ öGÆ’*ß‼5*☻4+74à¥♥Ω¶

I winzor.

I too wondered why percents wouldn't show...
img]http://i46.photobucket.com/albums/f108/K7Eternal/CeaserSig-1.gif[/img]

Evlesoa

  • Guest
Percent symbol (%)?
« Reply #22 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?

AKAnotu

  • Posts: 616
  • Turrets: +7/-9
Percent symbol (%)?
« Reply #23 on: June 10, 2007, 02:26:23 am »
˚∆˙©ƒ∂ßåœ∑´®†¥¨ˆøπ“‘≥≤µ˜∫√ç≈Ω

TinMan

  • Posts: 1019
  • Turrets: +49/-70
    • http://neonpulse.net
Percent symbol (%)?
« Reply #24 on: June 10, 2007, 03:20:15 am »
UNICODE TREM! LAWL
Code: [Select]
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