I looked at the keyboard-Panel - I don't see any suspicious things related to "o".
But to make things clear: I run mach4 from a virtualbox-VM no real windows pc
and I checked SecondsToTime:
When I saw the format-string "%04f" I knew that something went wrong. So I added an error-log which leads to
function SecondsToTime(seconds)
if seconds == 0 then
return "00:00:00.00"
else
local hours = string.format("%02.f", math.floor(seconds/3600))
local mins = string.format("%02.f", math.floor((seconds/60) - (hours*60)))
local secs = string.format("%04.2f",(seconds - (hours*3600) - (mins*60)))
mc.mcCntlSetLastError(inst, "secs " .. secs)
return hours .. ":" .. mins .. ":" .. secs
end
end
you can see the result in the errorline of the attached screenshot.
I tested the same with lua outside of mach4 with the result, that lua does not support leading '0' on float formats.
A SecondsToTime function, that works as expected is a bit ugly:
function SecondsToTime(seconds)
if seconds == 0 then
return "00:00:00.00"
else
local hours = math.floor(seconds/3600)
local mins = math.floor((seconds/60) - (hours*60))
local tmp = seconds - (hours*3600) - (mins*60)
local secs = math.floor(tmp)
local rest = math.floor((tmp - secs) * 100)
return string.format('%02d:%02d:%02d.%02d', hours, mins, secs, rest)
end
end