[JS]AutoUpdate (The most complicated way? xd)
-
Complicated AutoUpdate
- check if update required
- download update using raw (on enable rn)
- thats it its just hella ugly in code
idk if its the best way to check if an update is needed but i used
localeCompare()
What should you do? Use Core to avoid ugly and long code like mine!
-
-
@suicidemouse33 idk its in every script i make
-
@faaatpotato why though
-
@faaatpotato said in [JS]AutoUpdate (The most complicated way? xd):
idk its in every script i make
-
@faaatpotato i meant like why are you putting that in the script's description
-
-
Update:
- Now added how to check for an version-change instead of an entire script-change
- its way easier to use now ig
-
The simplest way
///api_version=2 (script = registerScript({ name: "ScriptThatAutoUpdates", authors: ["CzechHek"], version: "1" })).import("Core.lib"); Core.updateURL = "raw script url" //such as https://raw.githubusercontent.com/CzechHek/Core/master/Scripts/InventoryManager.js //if a script is in Core's repo, it gets checked automatically without the need of updateURL property //if updateURL == false ("" / false / NaN / ...) then autoupdating is disabled