"$" variable out of range (1)

Rivanni's icon

When I use [append parameters $1] as shown in the demo patch, I get the following error in the console or Max for Live window:

"$" variable out of range (1)

This error appears when loading the device in Live, opening it in Max, and saving it. Pasting the code does as well.

Clicking on the error does not locate this in the patcher or highlight anything. It took me a while to figure out where the error originated.

Why is this error occurring, and why isn’t the location highlighted like other errors?

The patch where this part originated from works without issues. The append works just fine, despite the error.

Happens in Max 8.5.8 (I did not check older versions) up to 9.0.4.

Max Patch
Copy patch and select New From Clipboard in Max.

tyler mazaika's icon

I think you want a backslash in front of the $ sign. This lets Max know not to try parsing "$1" as a variable.

Rivanni's icon

I thought I tried that before, but not, since that's the solution. Thanks!

Still strange that this is not pointed at when clicking on the error.