summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
Diffstat (limited to 'game')
-rw-r--r--game/script.rpy19
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: