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: try:
chapter_list_index = chapter_list.index(chapter) chapter_list_index = chapter_list.index(chapter)
except ValueError: except ValueError: # This crashes the game otherwise since it wouldn't find the correct chapter
chapter_list_index = -1 MainMenu(confirm=False) () # Exits to the main menu
chapter = ""
label reset_chapter_list: label reset_chapter_list: