invalid path in LiveAPI

annam's icon

Help needed!

Stored the paths of certain tracks in an array:

tracks_path_array.push(theTracks.path);

It works. Iterating through the this shows: "live_set tracks 0" or  "live_set tracks 5"

But reusing it like:

var thisTrack = newLiveAPI(tracks_path_array[x]);

doesn´t work. "invalid path"

annam's icon

Found the solution:

String replied by the aray must be sliced, to remove  the question marks!

annam's icon

Sorry, not question marks, quotation marks!

parkingsun's icon

yeah, this business about some strings having extra quotation marks in is non obvious. same with the difference between getting a single number and an array of numbers. you can debug this kind of weird behaviour by not relying on the flakey post messages that Max produced by default, but by using, e.g. a "pretty printer" function that makes the types of all variables clear. I use one from Stack overflow.