Forum Discussion
JackCalderone-3
6 months agoCommunity Member
Storyline variable data type bug
Hello e-Learning Hero community!
I have been very disappointed with Storyline recently, and need some help understanding it’s absolute INCONSISTENCY when it comes to handling the data type of its ...
JackCalderone-3
6 months agoCommunity Member
Not a forever solution, but I've found a workaround that will work for now!
Designers looking to import numeric variables into JavaScript that interacted with numeric entry fields can use the 'Number()' wrapper when calling the variable in the Execute JavaScript function.
So instead of:
" var value1 = player.GetVar('number1'); "
Try this!
" var value1 = Number(player.GetVar('number1')); "
This will force the variable as its called to remain as a number.