so, you could try also:
dim $all[0] instead of 100.

little explaining.
you dimmed (initialized) the var as normal variable.
with [anything] you initialize it as array.

if you don't feed it with array, it will never be array and that surely does cause errors.
also, with right after the dim line you could have done:
$all=0,0
or:
$all="",""

to do same but little longer.
the real deal is to find out why it never gets to array state.
should $all have some info in it? as it seems it never gets any.
_________________________
!

download KiXnet