I am trying to make a program that draws a 5x5 picture based on a Matrix. The matrix has to have the numbers 10-24 (which correspond to the different colors on the Ti 84 CE) or 0, which will turn off the pixel. The matrix is set up like this:

[10,10,10,10,10]

[10,10,10,10,10]

[10,10,10,10,10]

[10,10,10,10,10]

[10,10,10,10,10]

This is the Program:

```
ClrDraw
1→X
1→Z
Z+4→V
For(Y,Z,V
For(X,1,5
If 0=[A](Y,X:Then
Pt-Off(3Y,3X)
End
For(W,10,24
If W=[A](Y,X:Then
Pt-On(3Y,3X,1,W)
End
End
End
```

Every time I run the program, it returns a invalid Dimension error, and I dont know why. Can anyone help?