🔥 Lifetime deal! Get Control Surface Studio for Just £67 👉 Click Here To Get It
Time left... mailtimers.com
⚠️ Lifetime licenses are ending soon, get yours before they're gone ⚠️
Your shopping cart is empty.

Syntax error when trying to offset a track by a number

Submitted by siejeje on Thu, 10/26/2023 - 14:12
siejeje
Control Surface Studio User

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?

Topic Category: 

1 Responses

Comments

JohnC
Forum Admin
#1

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