diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-31 15:31:45 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-31 15:31:45 -0300 |
commit | b5695bba0c0e01a22bc48156ca1fb7228bf8268a (patch) | |
tree | 996303f3c7bb890f95c3f8819f331d3c520d9641 /game/script.rpy | |
parent | 23340808b34d3d51a784da15db91eca1ae0b6c68 (diff) | |
download | client-b5695bba0c0e01a22bc48156ca1fb7228bf8268a.tar.gz client-b5695bba0c0e01a22bc48156ca1fb7228bf8268a.tar.bz2 client-b5695bba0c0e01a22bc48156ca1fb7228bf8268a.tar.xz client-b5695bba0c0e01a22bc48156ca1fb7228bf8268a.zip |
Try to fix a few... bugs.
Diffstat (limited to 'game/script.rpy')
-rw-r--r-- | game/script.rpy | 19 |
1 files 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: |