Sorry but I don't undestand what you mean:
static private function timer():Void
{
nTimer = nTimer;
// why write nTimer = nTimer?? Is like writing 1=1
//_root.hud.timer.text = nTimer;
// why write this text area two times? you can write it at the end of the function
nTimer = nTimer - 0.02;
if (nTimer == 0)
{
// nTimer = 0;
// if we are here it means that nTimer == 0, so why to set it again as =0 ?
//_root.hud.timer.text = nTimer;
// why write this text area two times? you can write it at the end of the function
}
_root.hud.timer.text = nTimer;
}
now for the updateScore function, what do you need?
Your script rounds the num var at two decimals but doesn't use it anymore
If you want to add to the rounded value the nTimer value, you have to replace
nScore = nScore + nTimer;
with nScore = num + nTimer;
While if you need a rounded value to 2 decimals as last value, you have to round it AFTER adding the nTimer value.
At the end, you can rould the num with a shorter script: num = Math.round(num*100)/100;