Globals, arrays and objects....
-
Er what am I doing wrong here?
Globals.padProfiles = [{ "PadNumber": i+1, "TriggerNote": 36, "ChokeGroup": 0, "ChokeCC": 0, "ChokeTime":1200, "MIDIPlayerTrigger": -1, "PadNoteOffChokes" : true }]; padProfiles[0].TriggerNote = 60;On start up this tells me..
Interface:! Line 14, column 28: Cannot assign to this expression!
Master Chain:! Line 14, column 28: Cannot assign to this expression!Have I never understood the limitation of the Globals namespace? (possible as I hardly ever use it..)
-
@Lindon and this:
Globals.padProfiles = [{"Note" :36}]; Console.print(padProfiles[0].Note);tells me:
Interface:! Line 6, column 34: API call with undefined parameter 0
Interface:! Line 6, column 34: API call with undefined parameter 0 -
@Lindon said in Globals, arrays and objects....:
possible as I hardly ever use it
Good

Which lines are those errors referring to?
-
@d-healey in the first example line 14 is:
padProfiles[0].TriggerNote = 60;in the second example line 6 is:
Console.print(padProfiles[0].Note); -
@Lindon well............
I was sure I didn't need to refer to a Global variable in this way but apparently you do:
Globals.padProfiles = [{ "PadNumber": i+1, "TriggerNote": 36, "ChokeGroup": 0, "ChokeCC": 0, "ChokeTime":1200, "MIDIPlayerTrigger": -1, "PadNoteOffChokes" : true }]; Globals.padProfiles[0].TriggerNote = 60; -
@Lindon nope that aint it...something else is broken...
and its a line in my code..so that is the solution... just need to refer to Globals explicitly