From b5695bba0c0e01a22bc48156ca1fb7228bf8268a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 31 Dec 2020 15:31:45 -0300 Subject: Try to fix a few... bugs. --- game/script.rpy | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/game/script.rpy b/game/script.rpy index 946db3b..9cc721c 100644 --- a/game/script.rpy +++ b/game/script.rpy @@ -139,7 +139,7 @@ label loop: try: TMP_BACKG=dl_search(allquests[Battle["world"]], "quest_id", Battle["quest_id"])["bg"] except: - traceback.print_exec() + traceback.print_exc() stdout("Invalid background for reloaded battle") pass # TODO: Handle errors @@ -205,10 +205,23 @@ label prologue: call SQ00001_prologue # Automatically begin quest $ Battle=loadquest(1) - $ update_ap() - play music MUSIC_BATTLE.id() fadein 0.5 + python: + try: + quest=dl_search(allquests["Main"], "quest_id", 1) + TMP_MUSIC=get_sfx(quest["music"]) + TMP_BACKG=quest["bg"] + update_ap() + except: + traceback.print_exc() + # Check for error + if (Battle in [FAILUREMSG, OFFLINEMSG, ERR_JSONDECODER, ERR_LOGIN_DEFAULT]): + $ renpy.call_screen("msgbox", "Error:\n\n%s\nYou'll be taken to town." % Battle) + jump restore + + play music TMP_MUSIC fadein 0.5 $ renpy.free_memory() window hide + $ renpy.stop_predict_screen("battle") jump combat label quit: -- cgit v1.2.3-70-g09d2