I want to know also why some of this code isn't working, I'm getting all kinds of errors. Mostly, subscript out of range from PetitComputer. what am I doing wrong? Are multidimensional arrays limited? So confused! any help is greatly appreciated in advance thank you all for the help you've given me so far.

DIM BALLS(25,4)

FOR T=1 TO 10

NEGY=RND(2)

IF NEGY==1 THEN BALLS(T, 3)=1

IF NEGY==2 THEN BALLS(T, 4)=0

IF NEGY==2 THEN BALLS(T, 4)=BALLS(T, 4)-1

NEXT T

FOR T=1 TO 9

X=BALLS(T, 1)

Y=BALLS(T, 2)

SPEEDX=BALLS(T, 3)

SPEEDY=BALLS(T, 4)

X=X+SPEEDX

Y=Y+SPEEDY

IF X>192 THEN SPEEDX=SPEEDX+0-1

IF X<0 THEN SPEEDX=SPEEDX+2

BALLS(T, 1)=X

BALLS(T, 2)=Y

BALLS(T, 3)=SPEEDX

BALLS(T, 4)=SPEEDY

GCIRCLE BALLS(T, 1), BALLS(T, 2), 5

NEXT T

GOTO @MAIN