Mirage Engine
Login Stuck - Printable Version

+- Mirage Engine (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Login Stuck (/showthread.php?tid=1669)



Login Stuck - jsventor - 10-04-2008

When I choose a character, it gets stuck on "Connected, sending char data..."

I tried checking out the "usechar" packet, but everything seemed fine...
Any help is appreciated (Using mirage 3.0.3 and its not a blank source, BUT, this did just start happening, so it can't be anything I added or that was added)


Re: Login Stuck - Stomach Pulser - 10-04-2008

That soemtimes randomly occurs to me, check packets and calls for login.


Re: Login Stuck - jsventor - 10-04-2008

Yup, I reviewed everything, I'll try deleting the accounts and making new ones or something


Re: Login Stuck - William - 10-04-2008

Hehe, I remeber this happening to me back when I first started with MS, I had tons of problems finding that problem back then.

First Delete Accounts.

Did you add binary recently?


Re: Login Stuck - jsventor - 11-04-2008

yup, they are Binary, and I tried Deleting them, still nothing


Re: Login Stuck - Coke - 12-04-2008

I'm 99% certain its to do with timers on the server being retarded.


Re: Login Stuck - jsventor - 12-04-2008

Hmm.. timers, I'll check it out


Re: Login Stuck - seraphelic - 12-04-2008

You know what would be awesome is a program to compare two sources, and then ignore some comparisons that you know arent causing the problem. You could compare your source to a fresh ms and find the problem pronto. I'll lol if this exists >.>


Re: Login Stuck - William - 12-04-2008

It's called that your type on the server isnt the same as the client one. So when logging in your binary gets messed up.


Re: Login Stuck - jsventor - 12-04-2008

I tried comparing, everything is good, And the types are the same


Re: Login Stuck - William - 12-04-2008

Post your save and load char subs.


Re: Login Stuck - jsventor - 13-04-2008

Load Player
[spoiler]
Code:
Sub LoadPlayer(ByVal Index As Long, ByVal Name As String)
Dim filename As String
Dim FileName2 As String
Dim CharName As String * NAME_LENGTH
Dim i As Long
Dim N As Long
Dim f As Long

    Call ClearPlayer(Index)
    
    filename = App.Path & "\main\Accounts\" & Trim$(Name)
    
    f = FreeFile
    Open filename & "\Account.dat" For Binary As #f
        Get #f, , Player(Index).Login
        Get #f, , Player(Index).Password
        For i = 1 To MAX_CHARS
            Get #f, , CharName
            FileName2 = filename & "\" & Trim$(CharName) & "\Char.dat"
            If FileExist("main\Accounts\" & Trim$(Name) & "\" & Trim$(CharName) & "\Char.dat") Then
                N = FreeFile
                Open FileName2 For Binary As #N
                    Get #N, , Player(Index).Char(i)
                Close #N
            End If
        Next i
    Close #f
Exit Sub
End Sub
[/spoiler]

Save Player
[spoiler]
Code:
Sub SavePlayer(ByVal Index As Long)
Dim filename As String
Dim PlayerName As String
Dim CharName As String
Dim i As Long
Dim N As Long
Dim f As Long

    PlayerName = Trim$(Player(Index).Login)
    If Dir(App.Path & "\main\Accounts\" & PlayerName, vbDirectory) = "" Then MkDir App.Path & "\main\Accounts\" & PlayerName
    filename = App.Path & "\main\Accounts\" & PlayerName & "\Account.dat"
    
    f = FreeFile
    Open filename For Binary As #f
        Put #f, , Player(Index).Login
        Put #f, , Player(Index).Password
        For i = 1 To MAX_CHARS
            Put #f, , Player(Index).Char(i).Name
        Next i
    Close #f
    
    For i = 1 To MAX_CHARS
        If Trim$(Player(Index).Char(i).Name)  "" Then
            CharName = Trim$(Player(Index).Char(i).Name)
            filename = App.Path & "\main\Accounts\" & PlayerName & "\" & CharName
            If Dir(filename, vbDirectory) = "" Then MkDir filename
            filename = filename & "\Char.dat"
            
            f = FreeFile
            Open filename For Binary As #f
                Put #f, , Player(Index).Char(i)
            Close #f
        End If
    Next i
End Sub
[/spoiler]


Re: Login Stuck - Coke - 13-04-2008

William I think he's talking about the random login sticks you get if you don't remove all the server timers, could be wrong though..