I coded a car race program and everything functions properly, except for the display. The program is supposed to display the number of correct and incorrect choices made by the player depending on his selection, but my program isn't displaying either one. Instead, it is displaying the number of times the program is run. Here is the piece I think is not functioning correctly:
Beginning...
Dim sChoice As String
Dim sResult As String Static iCorrectNum As IntegerStatic iIncorrectNum As Integer
sChoice = lbxResults.SelectedIndex.ToString (From a list box with selections)
...
(Area where I think the problem is)...
If
sChoice <> "No Guess" Then If sResult = sChoice TheniCorrectNum = iCorrectNum + 1
ElseiIncorrectNum = iIncorrectNum + 1
End IflblCorrectDisplay.Text = Convert.ToString(iCorrectNum)
lblIncorrectDisplay.Text = Convert.ToString(iIncorrectNum)
End If
Any help is appreciated.