Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 01:27

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Please Help with this code Auto Update

Discussion on Please Help with this code Auto Update within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2011
Posts: 6
Received Thanks: 0
Please Help with this code Auto Update

Please Help with this code Auto Update APP
HTML Code:
Private Sub AutoPatcher1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles AutoPatcher1.DoWork
        On Error Resume Next
        'AutoPatcher
        Dim base As String = "https://stayll.xyz/APP/patch/"
        Dim startup As String = Application.StartupPath
        Kill(startup + "\Stayll\version.txt")
        My.Computer.Network.DownloadFile(base + "version.txt", startup + "\Stayll\version.txt")
        Dim newversion As Double = Convert.ToDouble(My.Computer.FileSystem.ReadAllText(startup + "\Stayll\version.txt"))
        If newversion > Application.ProductVersion Then
            Translation.msg("AutoPatcher", "NEW_VERSION", MsgBoxStyle.Information)
            Cancel_File()
        Else
            Cancel_File()
        End If
    End Sub
File version.txt
1.0.0.0
__________________________________________________ ________
After open give me new version
Stayll1 is offline  
Old 11/13/2019, 13:24   #2
 
elite*gold: 100
Join Date: Apr 2008
Posts: 860
Received Thanks: 1,487
Quote:
Originally Posted by Stayll1 View Post
HTML Code:
Private Sub AutoPatcher1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles AutoPatcher1.DoWork
...
        Dim newversion As Double = Convert.ToDouble(My.Computer.FileSystem.ReadAllText(startup + "\Stayll\version.txt"))
...
End Sub
File version.txt
1.0.0.0
There's an error when converting the version to double. A double usually has only one dot. Like 1.0, 2.5, 3.14. Your version has three dots. That's not going to work.
florian0 is offline  
Thanks
1 User
Old 11/13/2019, 14:51   #3
 
Ludder231's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 880
Received Thanks: 113
you should use the Version-Class.

Code:
Version v1 = new Version(2, 0);
Version v2 = new Version("2.1");
Console.Write("Version {0} is ", v1);
switch(v1.CompareTo(v2))
{
   case 0:
      Console.Write("the same as");
      break;
   case 1:
      Console.Write("later than");
      break;
   case -1:
      Console.Write("earlier than");
      break;
}
Console.WriteLine(" Version {0}.", v2);
Ludder231 is offline  
Thanks
2 Users
Reply


Similar Threads Similar Threads
PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE
06/21/2011 - Metin2 Private Server - 5 Replies
HELP WITH THIS PLEASE ON MY DEDICATED SERVER :-( http://www.youtube.com/watch?v=UyKOTLb960Q log_file_delete_old: stat: No such file or directory connect: Connection refused Timed out Connection refused
Guys please please please please make a euroshaiya bypass please game hack error
09/19/2009 - Shaiya - 5 Replies
Guys make a euroshaiya bypass please



All times are GMT +1. The time now is 01:28.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.