Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Need help adding this play button check for version.


kanechart
 Share

Recommended Posts

I have a auto updater and works great and anyways I would like to add this feature into my mainmenu

I want to use the following:
```
frmMainMenu.lblVersion.Caption = "Version: " & Parse(24)
```to check against:
a simple code line inside the client and in fact it can be right under the below code and be something like clientver 1.1

So when you click play it will check make sure you have the latest version so from server data.ini to the client made verfile inside the client. If it's right it keeps doing the following like always:
```
If ReadINI("CONFIG", "Auto", App.Path & "\config.ini") = 0 Then
    If LenB(frmLogin.txtPassword.Text) <> 0 Then
        frmLogin.Check1.Value = Checked
    Else
        frmLogin.Check1.Value = Unchecked
    End If
    frmLogin.Visible = True
    Me.Visible = False
Else
```
If it's wrong then it would open the updater.exe instead.

I think this be easy I don't know how to handle a packet yet like the version from the server nor how to do a compare.

This example will be super helpful :)
Link to comment
Share on other sites

```
Call SendData("packetName" & SEP_CHAR & versionNumber)
```
Then, server-side, do a check in the HandleData for that packet.

```
Case "packetName"
    If Parse(1) <> GetVar("version.ini", "latest", "thing") Then
        Call SendPacketTo(index, "needupdate")
    End If
```
Then, client side

```
Case "needupdate"
    'Updater stuff here.
```

Obviously a mock code for example purposes. It's just a matter of using SendData and SendDataTo in order to communicate back and forth. :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...