Syntax error when trying to offset a track by a number

46 viewsCSS Questions
0

Hi,
I’m trying to set a reaction for the track whose number is obtained from a modifier offset by certain number.

I start with this for the listener:
self.song().tracks[self.get_modifier_value(“m5”)].add_output_meter_level_listener
And everything works fine.

But when I want to increase the track number by 1 the script does not compile at all due to syntax error.
self.song().tracks[self.get_modifier_value(“m5”) + 1].add_output_meter_level_listener

I’ve seen examples on this forum with offsetting like that so not sure what am I doing wrong. Any thoughts?

admin Changed status to publish May 22, 2024
0

Its probably because you’re using a “+” in the listener.
You can only use that with conditions and values.

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