Rounding a Total Score

Hello...BTW...Thanks for your wonderful service  

At the end of the interaction there is a total score (ScoreAnteiorPosteriorTotal) which needs to be rounded. I've tried the following javascript code on a button to reveal a layer with the rounded score but it is not working. I missing something:

var player=GetPlayer();

var ScoreAnteiorPosteriorTotal=player.getVar("ScoreAnteiorPosteriorTotal");

var ScoreTotal=Math.round(ScoreAnteiorPosteriorTotal);

player.setVar("ScoreAnteiorPosteriorTotal", ScoreTotal);

Thanks so much for your help.

Rhea  :-)

Be the first to reply