Hmmmph. My question is simple but has baffled me for a little while now. I'm making my own version of Snake and have got quite a long way towards finishing it. The one thing I need to do to finish is to manipulate some arrays.
1) How do I find the length of an array? Say the array is snakeX, I've tried Len(snakeX) and that doesn't work.
2) Having created an array, how can I change its length? When the snake grows, I need to record all the positions that it occupies, and the array that holds these values needs to grow as well. You can do the following:
But having set the array's length you cannot reset it with a different value.Code:Dim snakeX() As Integer Private Sub Form_Load() ReDim snakeX(5) End Sub
Any help would be MASSIVELY appreciated.
Thanx,
Sam




Reply With Quote