It really is a simple thing, but for the life of me, I can't get it to work.
if (Act.getActivityInfo().elapsedDistance != null) {
var aaa = (Act.getActivityInfo().elapsedDistance);
var bbb = (Act.getActivityInfo().elapsedDistance/DistUnit);
var ddd = (Act.getActivityInfo().elapsedDistance/1000.0) % 1;
Sys.println(aaa + ":" + bbb + ":" + ccc + ":" + ddd);
It's very simple - I just want to implement autoLap and want to do a MOD to get a remainder of 0 to execute a new lap.
But I keep getting the unexpected type error when I do the mod (the ddd row)
no matter what I tried, I keep getting errors.
divide by 1000 or 1000.0 or putting a format("%02d") or toNumber() or toString() or toFloat() all gives me the error.
I know it's really simple - but for the life of me, I don't know what's happening.