Conversation

Notices

  1. !freegaming !rbadev !gamedev I've just played a bit with notabug.org because I want to host a mirror repo of # 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():
    # 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
    # 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!'

    Wednesday, 21-Sep-16 09:14:14 UTC from gnusocial.de