Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to convert to binary... Small bug
#1
I guess theres a bug I can succesfully create an account with no problem but when I try to login it says wrong password

Heres my Passwordok function

Code:
Function PasswordOK(ByVal Name As String, ByVal Password As String) As Boolean
Dim FileName As String
'Dim RightPassword As String
Dim RightPassword As String * NAME_LENGTH
Dim nFileNum As Integer

    PasswordOK = False
    
    If AccountExist(Name) Then
    
    nFileNum = FreeFile
    Open FileName For Binary As #nFileNum
    
        FileName = App.Path & "\Accounts\" & Trim(Name) & ".zap"
        Get #nFileNum, 20, RightPassword '= nFileNum.Password
    
                RightPassword = Player(Index).Password
        
        If UCase(Trim(Password)) = UCase(Trim(RightPassword)) Then
            PasswordOK = True
        End If
    End If
End Function

I been trying alot to make it load right but I cant make it work >.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)