Ok with what it had in it I didn't have a clue how it worked so i made an easy one Lets start with the server In modGeneral Replace
' Version constants Public Const CLIENT_MAJOR = 3 Public Const CLIENT_MINOR = 0 Public Const CLIENT_REVISION = 3 With
' Version constants Public Const VERSION = "1.0"
Ok now to modServerTCP And Find
' Check versions If Val(Parse(3)) < CLIENT_MAJOR Or Val(Parse(4)) < CLIENT_MINOR Or Val(Parse(5)) < CLIENT_REVISION Then Call AlertMsg(Index, "Version Outdated, please Visit http://blablabla.com") Exit Sub End If
And Replace it with
' Check versions If Val(Parse(3)) < VERSION Then Call AlertMsg(Index, "Version Outdated, please Visit http://blablabla.com") Exit Sub End If Now to the Client Side add in modTypes
' Version constants Public Const VERSION = "1.0" Ok now find in modGameLogic
Case MENU_STATE_LOGIN frmLogin.Visible = False If ConnectToServer = True Then Call SetStatus("Connected, sending login information...") Call SendLogin(frmLogin.txtName.text, frmLogin.txtPassword.text) End If And replace it with Code:
Case MENU_STATE_LOGIN frmLogin.Visible = False If ConnectToServer = True Then Call SetStatus("Connected, sending login information...") Call SendLogin(frmLogin.txtName.text, frmLogin.txtPassword.text, VERSION) End If
Ok and now to modClientTCP and find Sub SendLogin and Replace the sub with
Sub SendLogin(ByVal Name As String, ByVal Password As String, ByVal VERSION As String) Dim packet As String
packet = "login" & SEP_CHAR & Trim(Name) & SEP_CHAR & Trim(Password) & SEP_CHAR & VERSION & SEP_CHAR & END_CHAR Call SendData(packet) End Sub And thats it just change the
Public Const VERSION = "1.0" When you update the client and server
|