Welcome to the Achaea Forums! Please be sure to read the Forum Rules
Nexus: variable value assignment question
Quick disclaimer, I'm a coding novice. I'm trying to be better but I end up kludging and brute forcing everything to get by. So with that out of the way:
I've run into some behavior with assigning variable values in Nexus that I don't understand. I know how to fix my code now but I would like to understand what is happening.
I have some variables that I'm assigning to zero onload by entering the script and calling the function, it looks something like this:
I then use a trigger to assign their values using simplified scripting (the pull-downs and such), so their values might be 1,0,1 respectively.
I then call another function that creates a variable with this script:
The problem is that when I pull the value for val4 it gives me 101... I'm expecting 2. So it appears that it is treating the values as strings when it adds them together. My fix for this is to change my trigger to set their values with script (instead of the modify variable) i.e.
and so on.
I can work with this, I'll just change my triggers to use the 'enter script' option, but I was hoping to understand this as it appears that I could be missing something fundamental.