Comment 3 for bug 1645565

Revision history for this message
Be (be.ing) wrote : Re: jscript issue: true/false is not 1/0

I'm confused why you're manipulating both the effect enabled switch and the mix knob. If you want to toggle the effect, just use the enabled switch.

Also, this code looks strange:
engine.setValue("[EffectRack1_EffectUnit1_Effect1]","enabled",+fxSlot1_enabled+);

I'm not sure what's going on with those +'s around fxslot1_enabled, but they're probably doing some implicit type conversion that isn't quite what you think it is. JavaScript's type conversions can be really weird and unintuitive, especially with the + operator. Generally, you shouldn't rely on implict type conversions in JavaScript. For some humorously absurd examples, see https://www.destroyallsoftware.com/talks/wat