This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
eniallator's profile picture

Program Automatic Updater!

Started by eniallator, 08 November 2015 - 06:28 PM
eniallator #1
Posted 08 November 2015 - 07:28 PM
Program - http://pastebin.com/jSWFQsA1

The way this program works is firstly you will have to provide it with file aswell as a pastebin code in a table where the file is the key and the code is the value. Secondly you will have to have a version variable in the following format:
version = "*insert version here*"
in both the pastebin file aswell as the local file for the program to not error (don't worry if you don't, it has error prevention and will print out whats wrong). Then my updater program will go through each of the key/values in the filesToUpdate table and compare the version variable not the contents of the pastebin and the local file and if the 2 version variables are different, the program will overwrite the existing local file with the pastebin file.

Need Help? be sure to check the pastebin link's comments at the top first before asking!
Edited on 09 November 2015 - 08:42 PM
TyDoesMC #2
Posted 09 November 2015 - 01:02 AM
Very good spaced/tabbed code. nice little program :)/>
eniallator #3
Posted 09 November 2015 - 10:13 AM
Very good spaced/tabbed code. nice little program :)/>
Thank you! i try to keep to good etiquette to make my code readable and commented :)/>