Results 1 to 15 of 15

Thread: [RESOLVED] Need help with a high score system by reading from txt file and player score. Help!

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Resolved [RESOLVED] Need help with a high score system by reading from txt file and player score. Help!

    I am reading things from a txt file. It is attached bellow. I know how to compare the scores to the scores in the text file, but, i have no idea how to make everything move down one... i have 10 labels. Lets say label5 is going to be replaced with the players score, label5's value will become label6's, label6's to label7, and so on. Its like it is bumping everything else down. label10's will be bumped off(unless that is the score being replaced). I have the code the replaces the score, but dont know how to bump everything down before that. Here is my code:

    Code:
    Dim i
    Dim overwrite As Boolean
    overwrite = True
        
    For i = 0 To hsn
        If score < highscores(i) Then
            lblName(i).Caption = scorename(i)
            lblScore(i).Caption = highscores(i)
            lblName(i).FontSize = 8
            lblScore(i).FontSize = 8
        ElseIf score > highscores(i) And overwrite = True Then
            'code here to bump everything down
            scorename(i) = username
            highscores(i) = score
            lblName(i).Caption = username
            lblScore(i).Caption = score
            lblName(i).FontSize = 8
            lblScore(i).FontSize = 8
            overwrite = False
        ElseIf overwrite = False And i < 10 Then
            lblName(i).Caption = scorename(i)
            lblScore(i).Caption = highscores(1)
            lblName(i).FontSize = 8
            lblScore(i).FontSize = 8
        End If
    Next i
    Please help!
    Attached Files Attached Files
    Last edited by Gamemaster1494; May 23rd, 2010 at 08:38 PM.
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width