Checking for updates...

Discussion in 'Programming & Scripting' started by Col2eight, Aug 17, 2009 with 3 replies and 276 views.

  1. Col2eight

    Col2eight Enthusiast

    Messages:
    74
    Ratings:
    1
    I have no idea how! lol...I've tried this code:


    Code:
            public int CurrentVersion = 1;
    
    private void CheckForUpdates()
    {
    WebRequest request = WebRequest.Create("http://localhost/version.txt");
    WebResponse response = request.GetResponse();
    StreamReader reader = new StreamReader(response.GetResponseStream());
    int NewestVersion = int.Parse(reader.ReadLine());
    string Link = reader.ReadLine();
    if (NewestVersion > CurrentVersion)
    {
    MessageBox.Show("A newer version is available: " + NewestVersion + Environment.NewLine + Link);
    }
    }
    Andi t came up with an error in the line "string Link = reader.ReadLine();"


    any help?

    I also don't really understand xml updating lol...but you can post how to do that way too if you know how. :smile:
     
  2. GoldBl4d3

    GoldBl4d3 Retired Retired

    Messages:
    3,758
    Ratings:
    1,328
    First of all, talk to me on Aim. I can get you fully setup. And if your going with xml. I can give you Crypt class so you can encrypt and decrypt your xml so know one can take the xml and do what they did with modio.

    My Aim: GoldBl4d3

    Seriously talk to me on there. It will be to hard to get you going the right way(fully) on here.
     
    • Like Like x 1
  3. OP
    Col2eight

    Col2eight Enthusiast

    Messages:
    74
    Ratings:
    1
    Thanks a bunch Gold. You are awesome. :smile:

    btw, sorry about messaging you then leaving. :\ I went to play the Bigs 2 demo with my bro for a while. Hopefully you'll be back on soon.
     
  4. Thilo

    Thilo Contributor

    Messages:
    2,786
    Ratings:
    1,200
    Goldblade, i think it is time for you to bust out another tutorial...
     

Share This Page