kanechart Posted December 5, 2009 Author Share Posted December 5, 2009 I have a auto updater and works great and anyways I would like to add this feature into my mainmenuI 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.1So 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 = FalseElse```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 More sharing options...
balliztik1 Posted December 5, 2009 Share Posted December 5, 2009 ```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 More sharing options...
kanechart Posted December 5, 2009 Author Share Posted December 5, 2009 Thanks I will play around with that. I don't know if I will get to far but it's fun anyways :) Link to comment Share on other sites More sharing options...
kanechart Posted December 6, 2009 Author Share Posted December 6, 2009 I failed at this was never able to get this fully functioning. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now