Forum Discussion
Can I prevent "NaN" from appearing in numerical entry?
Hi there
I would like to add up a couple of numbers in Storyline 3. I thought I could use the number entry field to do this? The number goes in fine but when I try to add the value that was entered to a variable to add up a score, I get the NaN issue.
Is there a simple way around this yet? I am really suprised Storyline can't add a number(s) to a variable. Maybe I am missing something here?
I have tried the following workarounds:
1. setting the value of the total variable to 0 when the timeline starts.
2. changing the state of a tick/check image if the correct number is entered to normal.
3. using a drop down question but I have several of the same numbers including 0 to select.
None of these work. I don't quite get how to apply the javascript so haven't tried that. Any explanation on how to add that would be helpful. e.g. do you just add the script and replace inH1 = numericentry1 variable?
Many thanks for any help with this.
Amanda
- MichaelHinze7 years agoCommunity Member
It would be easier to help, if you can share your .story file (or the one slide) here.
- Amanda-Gunning7 years agoCommunity Member
Hi Michael
Please see attached.
Many thanks
Amanda
- MichaelHinze7 years agoCommunity Member
Have a look at the attached and see if that's what you wanted. I corrected some triggers and added some to calculate the total score.