Memory game code issues

Reply

Join Date: Jul 2004
Posts: 3
Reputation: Jessica Lares is an unknown quantity at this point 
Solved Threads: 0
Jessica Lares Jessica Lares is offline Offline
Newbie Poster

Memory game code issues

 
0
  #1
May 27th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 43
Reputation: vbCNEW is an unknown quantity at this point 
Solved Threads: 3
vbCNEW vbCNEW is offline Offline
Light Poster

Re: Memory game code issues

 
0
  #2
May 28th, 2008
you should decclare previndex static or global not inside the procedure..
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC