Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
binary accounts the easy way....
#3
so your say move the whole pet=no to the clear player then just replace the rest with


Code:
Sub SavePlayer(ByVal index As Long)
Dim FileName As String
Dim f As Long

    FileName = App.Path & "\accounts\" & Trim$(Player(index).Login) & ".bin"
        
    f = FreeFile
    Open FileName For Binary As #f
        Put #f, , Player(index)
    Close #f
End Sub


Code:
Sub LoadPlayer(ByVal index As Long, ByVal name As String)
Dim FileName As String
Dim f As Long

    Call ClearPlayer(index)
    
    FileName = App.Path & "\accounts\" & Trim(name) & ".bin"

    f = FreeFile
    Open FileName For Binary As #f
        Get #f, , Player(index)
    Close #f
End Sub
and it will work, and I don't have to change anything else.

oh oops that's already in sub clearplayers. I guess that it was being used twice and I didn't notice lol.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)