Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Connecting
#1
Annoying Problem, basically, whenever I use a character, it gets stuck on "Connected, sending char data..."

Ok, so First off, I compared the source to a Regular Mirage Source, and everything is basically the same.
Here is all the code I have for using characters, I reviewed MILLIONS of times >.>

Client
Code:
Case MENU_STATE_USECHAR
            frmChars.Visible = False
            If ConnectToServer = True Then
                Call SetStatus("Connected, sending char data...")
                Call SendUseChar(frmChars.lstChars.ListIndex + 1)
            End If

Code:
Sub SendUseChar(ByVal CharSlot As Long)
Dim Packet As String

    Packet = "usechar" & SEP_CHAR & CharSlot & END_CHAR
    Call SendData(Packet)
End Sub

Server
Code:
' ::::::::::::::::::::::::::::
    ' :: Using character packet ::
    ' ::::::::::::::::::::::::::::
    If LCase(Parse(0)) = "usechar" Then
        If Not IsPlaying(Index) Then
            CharNum = Val(Parse(1))
        
            ' Prevent hacking
            If CharNum < 1 Or CharNum > MAX_CHARS Then
                Call HackingAttempt(Index, "Invalid CharNum")
                Exit Sub
            End If
        
            ' Check to make sure the character exists and if so, set it as its current char
            If CharExist(Index, CharNum) Then
                Player(Index).CharNum = CharNum
                Call JoinGame(Index)
            
                CharNum = Player(Index).CharNum
                Call AddLog(GetPlayerLogin(Index) & "/" & GetPlayerName(Index) & " has began playing " & GAME_NAME & ".", PLAYER_LOG)
                Call TextAdd(frmServer.txtText, GetPlayerLogin(Index) & "/" & GetPlayerName(Index) & " has began playing " & GAME_NAME & ".", True)
                Call UpdateCaption
                
                ' Now we want to check if they are already on the master list (this makes it add the user if they already haven't been added to the master list for older accounts)
                If Not FindChar(GetPlayerName(Index)) Then
                    f = FreeFile
                    Open App.Path & "\accounts\charlist.txt" For Append As #f
                        Print #f, GetPlayerName(Index)
                    Close #f
                End If
            Else
                Call AlertMsg(Index, "Character does not exist!")
            End If
        End If
        Exit Sub
    End If

[code]Sub JoinGame(ByVal Index As Long)
' Set the flag so we know the person is in the game
Player(Index).InGame = True

' Send a global message that he/she joined
If GetPlayerAccess(Index)
Reply
#2
EDit:

nvm, It didnt do that, its has the Number sett perfectly fine, but still nothing :?
Reply
#3
What are you using to connect, IE: port etc.

And are you using a router by any chance? If so, have you forwarded the port you are using for mirage?

Also, in you joingame sub, uncomment the LOGINOK send! :wink:
Reply
#4
Still nothing, I'm just going to remake a server Lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)