Right im creating a simple game of snakes and ladders and im confused by the last steps of the game. (Ie. where you have to roll the exact number to finish the game, or if you roll over that number you move back the remaining spaces)
so this is the code i have so far but cant for the life of me figure out how to get it to go up to 99 (effectively the 100th square but due to array's ...) and then backwards, i know my code doesnt exactly help what i want to do as its just adding the dice roll every time, but as i said i cant figure it out
so this is the code i have so far but cant for the life of me figure out how to get it to go up to 99 (effectively the 100th square but due to array's ...) and then backwards, i know my code doesnt exactly help what i want to do as its just adding the dice roll every time, but as i said i cant figure it out

Code:
EndPosition = MyPosition + Text1 'myposition + dice roll
For i = MyPosition To EndPosition
Call SetPosition(i)
MyPosition = i 'basically just setting it so i can use it if needs be
Delay 0.5
Text5 = MyPosition 'just to display position
Next i
Code:
Private Sub SetPosition(ByVal N As Long)
r = N \ 10
If IsOdd(r) Then
c = 9 - (N Mod 10)
Else
c = N Mod 10
End If
Shape1.Left = (c * 41) + 10
Shape1.Top = 410 - 30 - (2 * 41)
End Sub