you declare variable either by assigning a value to it or by explicitly making it something with global or dim.
you do none of these.

simple change your "declaration" line to:
dim $errorpile[3]

and it should work just fine
_________________________
!

download KiXnet