General > Developers Corner
Version Check?
XxLMM13xX:
Ok so i see on alot of addons a version check that says something like... Version is not up to date download the new version here: (link)
I have no clue how to do this all i know is people do it with the github download thing.. I really dont know...
If you can find a tut on this or teach me step to step that would be awesome! Thanks!
Aaron113:
These should get you started.
http://forums.ulyssesmod.net/index.php/topic,3138.0.html
http://ulyssesmod.net/downloads.php
XxLMM13xX:
--- Quote from: Aaron113 on March 15, 2015, 03:12:49 PM ---These should get you started.
http://forums.ulyssesmod.net/index.php/topic,3138.0.html
http://ulyssesmod.net/downloads.php
--- End quote ---
I do not understand how this will help??? I know how to download a SVN...
Please explain how that will help???
Bytewave:
Simple.
Create a VERSION constant in one of your scripts (or probably a new one), and assign it a value.
Host a version file on the location of your choice on the public Internet. Gist or Dropbox is great for that. In the file, write nothing more than the value that you assigned VERSION.
Then, run an http.Get() on your URL in Garry's Mod, probably when a GUI is created or on a hook of some type.
In the success callback, compare the response of http.Fetch() to the VERSION constant's value. If the same, up to date. If different, outdated. Handle as you wish.
XxLMM13xX:
--- Quote from: Bytewave on March 15, 2015, 04:01:32 PM ---Simple.
Create a VERSION constant in one of your scripts (or probably a new one), and assign it a value.
Host a version file on the location of your choice on the public Internet. Gist or Dropbox is great for that. In the file, write nothing more than the value that you assigned VERSION.
Then, run an http.Get() on your URL in Garry's Mod, probably when a GUI is created or on a hook of some type.
In the success callback, compare the response of http.Fetch() to the VERSION constant's value. If the same, up to date. If different, outdated. Handle as you wish.
--- End quote ---
This probably would help ALOT! The thing is i dont know what ANYTHING in what you said does... I'm asking for help on what to do... (this means EVERYTHING) like what file do i create? How do i make it check for the new versions? basicly where does the http thingy go? Explain a little better if you could...
Thanks so far btw!
Navigation
[0] Message Index
[#] Next page
Go to full version