From aee5d8b610d6b97d559edf10722e6c0211d950b1 Mon Sep 17 00:00:00 2001 From: Iggy Date: Fri, 30 Aug 2024 20:31:52 -0300 Subject: [PATCH] find_chapter_in_array now exits to the main menu in case of error --- game/src/chapter_select.rpy | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/game/src/chapter_select.rpy b/game/src/chapter_select.rpy index 30040c7..b1558f6 100644 --- a/game/src/chapter_select.rpy +++ b/game/src/chapter_select.rpy @@ -109,9 +109,8 @@ init python: try: chapter_list_index = chapter_list.index(chapter) - except ValueError: - chapter_list_index = -1 - chapter = "" + except ValueError: # This crashes the game otherwise since it wouldn't find the correct chapter + MainMenu(confirm=False) () # Exits to the main menu label reset_chapter_list: