find_chapter_in_array now exits to the main menu in case of error

This commit is contained in:
Iggy 2024-08-30 20:31:52 -03:00
parent 4ce0d1df31
commit aee5d8b610

View file

@ -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: