GLOBAL SCOPE: Variables

514 viewsCSS Questions
0

Hi John
Im wanting to create a global int to store clip length for session record of audio tracks. I looked at the box code you sent and you mentioned it was global but it seems that Im not understanding it.
For global scope, I would have thought it would need a declaration of type etc before being used; in this case I need to use it to wrap an int from 1 to 4
ie
self.rec_clip_len = int*(self.rec_clip_len + 1) % 5)

but the scope seems to end at the reaction level and not sure how I would add those sorts of user variables to be used?

Cheers

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

They should be global, there’s 2 possible things to be aware of though:
1. the calling method needs to declare the variable using ‘global variabeName’ in order for it to be available for use. See other methods in the scripts which do this.
2. the reaction may need to be ran/fired before the variable becomes available.

admin Changed status to publish May 22, 2024
Attached Files:
You are viewing 1 out of 2 answers, click here to view all answers.