Hi there!
I am getting an error in the console that is doubtless because I am doing something silly, but basically I 'borrowed' a bit of code from another post to capture the label of a switch (and used it in the 'value' entry of a variable). It was all working to plan til I noticed the console flash up this error whenever it received a new switch value:
'KK1FXNameVariable.onValue javascript error at line 1: TypeError: value.match is not a function'
The actual JS I have in the 'value' field of the variable (that does seem to return the label of the switch position!) is this:
JS{{
var values = @{KK@{parent.variables.a}DynPostFader.values},
v = @{KK@{parent.variables.a}DynPostFader}
return Object.keys(values).find(k => values[k] == v)
}}
Sorry to be a pain but have no idea what the error message means!
Any assistance greatly appreciated thanks!
Edit - Actually, I think I have managed to play around a bit with project and fix this, seems it didn't like a label with a value of '1 ', '2 ' etc, but when I changed this to '1. ', '2. ' etc the console stopped displaying the error (still don't understand what was going on but happy the error has gone! )