Jump to content

Recommended Posts

Posted

Hi everyone, I'm currently working on a mod that makes the JTAC give the target location in Degrees Minutes Seconds so that you can bomb them precisely with the JDAM or just to find the targets in the first place to employ other weapons. All I'm doing is modifying the NATO.lua file in Sounds/Speech/. Part of my code that creates the JTAC's voice line looks like this.

 

local strLat = base.string.format('%02d',latDeg) .. '.' .. base.string.format('%02d',latMin) .. '.' .. base.string.format('%02d',latSec) .. '.' .. base.string.format('%02d',latDec)
local strLon = base.string.format('%02d',lonDeg) .. '.' .. base.string.format('%02d',lonMin) .. '.' .. base.string.format('%02d',lonSec) .. '.' .. base.string.format('%02d',lonDec)

 

Currently the output coordinate will look something like this: 54.25.14.88

I would like to format it so that it is easier to understand, like this: 54°25'14.88"

 

When I try to change the periods to apostrophes or quotation marks, it breaks the script and the radio won't work at all, and I'm unsure if it's possible to display the degrees symbol in the radio message.

 

Any help would be greatly appreciated!

 

mu110

Posted
My guess is that it's a text encoding issue. Have you tried UTF-8 or UTF-8-BOM?

 

I had it set to UTF-8 and just tried it with UTF-8-BOM with no success. My guess was that it had something to do with the fact that I was enclosing an apostrophe with a pair of apostrophes, is there a way I can let the script know to treat it just as text?

Posted

I know in some languages you can interpret it as " ' " or ' " '. Try flipping quotations around. There is ' \' ' and likewise to break it. (Forums won't let me type the other method, as it defaults to ".)

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...