Thanks again for your help! I got it to work! If anybody is trying to find the right code here it is:
Code:Dim Party As String = "C:\Party.txt" 'List made of the correct steps to compare Dim PartyText As New System.IO.StreamReader(Party) 'Reads the text file CorrectSteps.Text = PartyText.ReadToEnd 'displays i will survive text file in rich textbox Dim intLinesParty As Integer = CorrectSteps.Lines.Length ' counts number of lines in the text box PointsPossibleBox.Text = intLinesParty Dim intLinesCorrect As Integer 'number of lines that match Dim intLinesWrong As Integer ' number of lines that do not match Dim f1 As New IO.StreamReader(GameScore) Dim fileData As String = f1.ReadToEnd() f1.Close() Dim file1Data As String() = fileData.Split(vbCr) Dim f2 As New IO.StreamReader(Party) fileData = f2.ReadToEnd() f2.Close() Dim file2Data As String() = fileData.Split(vbCr) Dim x As Integer For x = 0 To UBound(file1Data) If file1Data(x) <> file2Data(x) Then intLinesWrong = intLinesWrong + 1 Else intLinesCorrect = intLinesCorrect + 1 End If Next WrongSteps.Text = (intLinesWrong - 1) ScoreBox.Text = intLinesCorrect - 1 PercentageBox.Text = (intLinesCorrect / intLinesParty) * 100




Reply With Quote