“mode has been updated” listener

587 viewsGeneral
0

does anybody know why I could be getting this error:

There’s a problem with ‘Action Block 1’ in reaction ‘LED feedback ‘ (from ‘mode is activated’ listener) >>
>> Index out of range

I added a listener to a my LED feedback reaction as I noticed that everytime I use the shift mode myLEDs go off (and do not relight after i have used the shift mode).
I thought that adding the “mode is activated” listener would resolve the issue but it doesn’t. Instead I get the error above, which I do not understand as how can a listener produce an index out of range error?

admin Changed status to publish May 22, 2024
0

Regarding your first comment:

Its probably this listener which is causing the error (in test.json):
self.song().view.selected_track.devices[0].parameters[26].add_value_listener

When the mode loads, if the selected track doesn’t have a device at position zero containing 26 parameters then it will cause this error.
Also note, the listener will only update when you reload the mode. It won’t update when you select a track.

admin Changed status to publish May 22, 2024
Attached Files: