Home   Help Search Login Register  

Author Topic: hint format special characters  (Read 502 times)

0 Members and 1 Guest are viewing this topic.

Ronald Speirs

  • Guest
hint format special characters
« on: 25 May 2004, 21:14:32 »
Hi,

The 'hint' command in combination with 'format' is a very useful tool to display information (and debug scripts).

hint format ["%1 ", _var]

However, the information is not always displayed as I want it.  :(

The only special character I know of is \n which performs a carriage return.

Are there any other special characters ?
E.g.: tab codes, colour coding codes (the FDF mod shows hints in blue color), a special character reserving 2 or more spaces for a variable number (in turbo-C for instance you could reserve 4 spaces for an integer variable using %4d)

Thanks for any help offered.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:hint format special characters
« Reply #1 on: 26 May 2004, 04:16:06 »
Nope. FDF mod makes ALL hints show up in blue, even for example ones in missions you have made (without putting in any special characters). They change things in the game's config that changes the hint color. This makes ALL hints show up that color, so they still have single-color hints, like everything else.

As for a 'tab code', you can just put in a few spaces yourself. Any more than like 3 spaces looks bad anyway.

I'm not entirely sure about your last question, but do you mean a code that would only display, say, the first 3 digits of a variable? In that case, you can easily accomplish that via scripting/math.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Ronald Speirs

  • Guest
Re:hint format special characters
« Reply #2 on: 26 May 2004, 18:03:26 »
With the last line I meant that if you have for instance a number of just one character (0..9), it occupies two places. This is sometimes necessary to make the layout of a table look right, independant of how many characters (one or two) the variable is occupying.

But I understand from your message that 'hint & format' don't allow for much layout possibilities.

Thx for the answer anyway.

Cheerio