The astute observer might have said "gee, why don't I turn that into a function so I won't have to type it over and over again and screw it up..."
Code:
// convert word in ms to secs string (ie "D.DDD")
public function format_msec(wval as word) as string(8)
result = DecToStr(wval/1000) + "." + DecToStr((wval MOD 1000), 3)
end function
reffering to post 127, I removed the , 3) + "secs" because it didn't look right on the LCD display.
as for the FUNCTION I contemplated using it but I was having too many issues with the value of MS interacting with CURRENT_SCORE and BEST_SCORE
Have to solve one issue at a time instead of throwing more fuel on the fire.
I have the code edited down so it doesn't access the eeprom so much.
Been trying out different sections of code first before combining it all together into one.
Still waiting on new pcboards before adding a second game option.
If you add the format_msecs function shown then there will be no interaction between anything and all those problems will go away.
To display a value you would simply use 'format_msecs(put_your_variable_name_here)' in the 'WriteAt' call, something like