diff options
Diffstat (limited to 'game')
-rw-r--r-- | game/script.rpy | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/game/script.rpy b/game/script.rpy index 456f4f8..7638ac8 100644 --- a/game/script.rpy +++ b/game/script.rpy @@ -61,7 +61,14 @@ init python: stdout("ERROR RECEIVED") stdout("More details: %s" % repr(err)) stdout("An error happened: %s" % str(err)) - renpy.full_restart() # maybe renpy.quit(relaunch=True) ? + # FIXME: If such error happen, the game never dies + # This is a huge problem o.o + while True: + renpy.call_screen("msgbox", + "An unrecoverable error happened.\nPress OK to return to main menu screen.") + # FIXME: Not working, and the loop also does not work + #renpy.quit(relaunch=True, status=1) + sdelay(1.0) # Inform you are now ingame label start: @@ -95,6 +102,7 @@ label start: ws = None if ws is None: + try: # server, sock, address # on_open=None, on_message=None, on_error=None, # on_close=None, on_ping=None, on_pong=None, @@ -113,6 +121,10 @@ label start: on_message=onmsg) ws.on_open = onopen renpy.invoke_in_thread(ws.run_forever) + except: + # Enter in infinite loop, this will never resolve + tr_load=False + stdout("Unrecoverable error, the program is dead.") while not tr_load: sdelay() |