Hi, I'm making a game where it will ask the winning player their name and will put that and their score into a .txt file. I want it to take the top 5 players and sort their scores to display in the .txt like a high-score table. To achieve this, I created a record structure called 'topscores' which contains variables of the player's name and the player's scores. Using a bubble sort, I've tried to find a solution however the following lines give me an error:

Code:
FileOpen(1, winners(counter).playername)
FileOpen(1, winners(counter).winningscore)
It tells me 'Argument not specified for parameter etc'. Here's the subroutine that contains these lines:


Code:
Sub highscore(ByRef winners() As topscores)
        Dim tempname As String
        Dim tempscore As Integer
        tempname = winners(0).playername
        tempscore = winners(0).winningscore
        For counter = 0 To 4

            winners(counter).playername = InputBox("Please enter your name")
            FileOpen(1, "h://highscore.txt", OpenMode.Input)
            winners(counter).playername = LineInput(1)
            winners(counter).winningscore = LineInput(1)
        Next

        If tempscore > winners(4).winningscore Then
            winners(4).winningscore = tempscore
        End If

        For outerloop = 3 To 0 Step -1
            For counter = 0 To outerloop
                If winners(counter).winningscore > winners(counter + 1).winningscore Then
                    tempname = winners(counter).playername
                    tempscore = winners(counter).winningscore
                    winners(counter).playername = winners(counter + 1).playername
                    winners(counter).winningscore = winners(counter + 1).winningscore
                    winners(counter + 1).playername = tempname
                    winners(counter + 1).winningscore = tempscore
                End If
            Next
        Next

        FileOpen(1, "h://highscore.txt", OpenMode.Output)
        For counter = 0 To 4
            FileOpen(1, winners(counter).playername)
            FileOpen(1, winners(counter).winningscore)
        Next
        FileClose()
    End Sub
Can anyone explain how I got this error and how I would correct it please? Thanks.