Ensure a number is a number.
This commit is contained in:
parent
693dfd1f15
commit
7471843374
@ -45,7 +45,7 @@ function LuaExportActivityNextEvent(t)
|
|||||||
print(v.Type) -- add this line for debugging purposes
|
print(v.Type) -- add this line for debugging purposes
|
||||||
local objectType = "unknown"
|
local objectType = "unknown"
|
||||||
objectType = type(v.Type)
|
objectType = type(v.Type)
|
||||||
json = json .. string.format('{"age_in_seconds":"%.1f", "unit_name":"%s", "group_name":"%s", "name":"%s", "latitude":%f, "longitude":%f, "altitude_in_feet":%f, "heading_in_rads":%f, "pitch_in_rads":%f, "bank_in_rads":%f, "coalition":"%s", "type":"%s"},', t, v.UnitName, v.GroupName, v.Name, v.LatLongAlt.Lat, v.LatLongAlt.Long, v.LatLongAlt.Alt, v.Heading, v.Pitch, v.Bank, v.Coalition, objectType )
|
json = json .. string.format('{"age_in_seconds": %.1f, "unit_name":"%s", "group_name":"%s", "name":"%s", "latitude":%f, "longitude":%f, "altitude_in_feet":%f, "heading_in_rads":%f, "pitch_in_rads":%f, "bank_in_rads":%f, "coalition":"%s", "type":"%s"},', t, v.UnitName, v.GroupName, v.Name, v.LatLongAlt.Lat, v.LatLongAlt.Long, v.LatLongAlt.Alt, v.Heading, v.Pitch, v.Bank, v.Coalition, objectType )
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Remove trialing comma
|
-- Remove trialing comma
|
||||||
|
Loading…
x
Reference in New Issue
Block a user