Also, DIM MOV[1] AS INTEGER is invalid code. Are you copying this code from another language? All you have to do to initialize an array is DIM MOV[1]. Also, you can't have the identifier of an array be the same as another variable which has already been used. It will throw a duplicate variable error. Line 22 will also throw an error since RND needs a parameter enclosed in parentheses.