# Running Total Number Variable

I am new to Storyline and have been diving into the tutorials, which are GREAT by the way! I am working on a project in Storyline 360 that I'm pretty sure needs a number variable, but I'm having some difficulties figuring it out. Here is how the course should work: The user types in any number they need, to answer the corresponding question on the slide. Then they click the Calculate button. This should add the number from the last slide to the number from the current slide, giving a running total as they move through the course. I understand the first slide would need to have a zero to start with. This course will eventually have a dozen or more slides. I provided a sample to see how the triggers would need to work before I go any further.

Thanks in advance.

## 3 Replies

You can build that math into the CALCULATE buttons. Also a good idea to disable those buttons after they have been clicked, else multiple clicks would add the values in multiple times.

Identity_Theft_Training_Sample.storyI took a look at your file Jerry and it was throwing "NaN" (not a number) errors if clicking the calculate button without typing something, and then since disabling the buttons, could proceed.

I just added a little condition to check if greater than 0. Oddly, it wouldn't accept the condition "if not equal to 0."

Identity_Theft_Training_Sample.storyTHANK YOU! THANK YOU! THANK YOU! :-)