954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Memory game code issues

Hi, I have a friend who's trying to make a memory game and we're kind of stump of what is wrong with the code. We've narrowed down that it pertains to this section of it:

If turn = 1 Then
   tempturn = 2
   picval1 = click
   previndex = Index
End If

If turn = 2 Then
   tempturn = 1
   picval2 = click
If picval1 <> picval2 Then
timWait.Interval = 1000

   Picture0(Index).Visible = True
   Picture0(previndex).Visible = True
End If
End If
turn = tempturn

There is more than 2 of each picture, and it's not showing the 2nd picture selected.

Jessica Lares
Newbie Poster
3 posts since Jul 2004
Reputation Points: 10
Solved Threads: 0
 

you should decclare previndex static or global not inside the procedure..

vbCNEW
Light Poster
44 posts since Apr 2007
Reputation Points: 10
Solved Threads: 3
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You