Crash: Trait menu empty

Create issue
Issue #60 resolved
Jesse Kaukonen created an issue

Crash while attempting to swap Youmu's active action trait. Pressing Z displays "Reserve Action Traits", which is empty. If you press Z in this empty menu, the game crashes. Probably due to attempting to push non-existing item to the trait list.

Keine got EXP: 10 Wind Weasel B got EXP: 10 Marisa hits Wind Weasel B Marisa does 15 damage! Marisa uses Danmaku - Fireball on Wind Weasel B Marisa got EXP: 18 Adding treasure to inventory. Id string: synth_fire Adding treasure to inventory. Id string: synth_earth Saving Player Data! Starting dump of player data Starting dump of event data Saved Player Data! Saving Player Data! Starting dump of player data Starting dump of event data Saved Player Data! Traceback (most recent call last): File "srpg.py", line 104, in <module> engine.title_screen() File "E:\lost-sky-project\Story of a Lost Sky\core_system\engine.py", line 1583, in title_screen self.launch_wm(True) File "E:\lost-sky-project\Story of a Lost Sky\core_system\engine.py", line 1616, in launch_wm self.worldmap.navigate_loop(True) File "E:\lost-sky-project\Story of a Lost Sky\worldmap_system\worldmap.py", line 427, in navigate_loop confirm_load = self.all_regions[tuple(self.player_pos)].navigate_loop(self.engine.player.wm_data['region_coords']) File "E:\lost-sky-project\Story of a Lost Sky\worldmap_system\worldmap.py", line 1239, in navigate_loop input_flag = self.user_input() File "E:\lost-sky-project\Story of a Lost Sky\worldmap_system\worldmap.py", line 1202, in user_input confirm_load = self.wm_parent.wm_menu() File "E:\lost-sky-project\Story of a Lost Sky\worldmap_system\worldmap.py", line 544, in wm_menu self.party_menu() File "E:\lost-sky-project\Story of a Lost Sky\worldmap_system\worldmap.py", line 685, in party_menu self.unit_options(selected) File "E:\lost-sky-project\Story of a Lost Sky\worldmap_system\worldmap.py", line 916, in unit_options selected_unit.trait_swap_menu() File "E:\lost-sky-project\Story of a Lost Sky\core_system\char.py", line 3575, in trait_swap_menu selected_trait = self.trait_swap_inventory(0) File "E:\lost-sky-project\Story of a Lost Sky\core_system\char.py", line 3737, in trait_swap_inventory if (event.key == K_z or event.key == K_RETURN) and self.reserve_traits[trait_list_pos][menu_pos]: IndexError: list index out of range

E:\lost-sky-project\Story of a Lost Sky>

EDIT: Typo

Comments (3)

  1. Rune Devros repo owner

    It was checking the wrong thing to determine if your trait list was empty or not. Fixed it. Thanks.

  2. Log in to comment