Setting default number of decimal points on a variable

I'm using variables in a calculator-type situation.  Everything works fine, except when there's a '0' for the second decimal digit.  Example:  $600.01 shows up as $600.01; however $600.10 shows up as $600.1 (instead of $600.10).    Is there anyway to make that second digit after the decimal point show up as a '0'?  Or some way to set a default number of digits to show after the decimal point?

14 Replies
Jesse Spinella

Because of this limitation, and how my boss likes "simple percents" I've had to come up with ways around this by using a state of an object to have % points for a grade and assigning variables to switch that object to the right % when the test is done grading. I'm going to send in a feature request too because this limitation causes a lot of extra work that seems unnecessary. If Storyline had a way to change the output of a number to be % and remove or add the decimal places, it'd make life a heck of a lot easier when coding this program. Not complaining, just well, okay, I'm complaining. Lol.

Joanna Pearce

Was there ever a solution to this issue? I am facing the same problem.

I am trying to create a supermarket checkout scenario where the user scans objects in front of the scanner and the items appear on the till with the total amount at the bottom. The total amount is calculated using a variable but Storyline keeps removing the last zero after the decimal place.

Joanna Pearce

Jesse Spinella said:

Here's how you can round up in Storyline. A co-worker of mine posted this a while back.

http://community.articulate.com/forums/t/31583.aspx

Jesse


Hi Jesse, Thanks for your reply, however I'm not trying to round up a percentage, I am trying to show the 0 after the decimal place.

For example, I want to add up the price of multiple shopping items but every time I get to a total of $12.10 ... it will show as $12.1

It keeps dropping the last 0 off the variable.

Is there a way in Storyline to keep the 2 decimal places, even when those digits are 0?