Conversation
Notices
-
!freegaming !rbadev !gamedev I've just played a bit with notabug.org because I want to host a mirror repo of #RBA there.
Now I've found a easy way to check if the local version of the game is the same as the last official release by checking a file in a git repo.
def check_version():
#this function compares the release_number from version.py whit a number that from the https://notabug.org/themightyglider/themightyglider.notabug.org/raw/master/index.html
#and returns: 'This version is up to date', 'Old version!!! Please update.', 'Can't reach server!'
try:
f = urlopen('https://notabug.org/themightyglider/themightyglider.notabug.org/raw/master/index.html')
vers_test = int(f.read())
if release_number == vers_test:
return 'This version is up to date.'
else:
return 'Old version!!! Please update.'
except:
return 'Can\'t reach server!'