Two things:
1:
To change the size of an array with $0 using messages, I prefer to do this:
[hslider] <-- or whatever
|
[resize $1(
|
When you do something like [; array1 resize $1(, the first thing after a semi-colon is considered a [send] name, and what follows it is the message to that [send]. So you can always just use a [send] instead, and you won't have $0 issues. However, there are times when you want to use $0 in a message. In that case, do it like this:
[hslider]
|
[pack f $0]
|
[; $2-array resize $1(
$2 just takes on $0 in that case.
2:
To use $0-arraynames in [expr], you have to do something similar to message boxes using [expr]s variable system. Remember, $0 itself is a variable that holds a unique number, and [expr] interprets "-" as a minus sign. So, say $0 gets assigned as 1002. The way you have it now, [expr] is interpreting it as "1002 minus arr
- ", and there is no table named "arr". What you want to do is take advantage of the $s# variable in [expr]. This allows you to add symbols into [expr] (the name of an array is a symbol).
. [loadbang]
. / | \
. / | \
. [1( [1( [f $0]
. / | \
[0\ [0\ [0\ [symbol $1-arr(
| / | \
[expr $s4[$f1+$f2]*$f3]