Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

On version 0.2.1, I got an error on the Dungeon Trader room:

[code]

I'm sorry, but an uncaught exception occurred.

While running game code:

  File "game/dungeon_rooms.rpy", line 337, in script call

    call expression _current_room_label from _call_expression_1

  File "game/dungeon_rooms.rpy", line 6487, in script

    $ offered_item_index = store.temp_selected_item_index

  File "game/dungeon_rooms.rpy", line 6487, in <module>

    $ offered_item_index = store.temp_selected_item_index

AttributeError: 'StoreModule' object has no attribute 'temp_selected_item_index'

-- Full Traceback ------------------------------------------------------------

Full traceback:

  File "game/dungeon_rooms.rpy", line 337, in script call

    call expression _current_room_label from _call_expression_1

  File "game/dungeon_rooms.rpy", line 6487, in script

    $ offered_item_index = store.temp_selected_item_index

  File "C:\Users\Anom\Games\Yuki Pop Repeat\v0.2.1\renpy\ast.py", line 834, in execute

    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)

  File "C:\Users\Anom\Games\Yuki Pop Repeat\v0.2.1\renpy\python.py", line 1187, in py_exec_bytecode

    exec(bytecode, globals, locals)

  File "game/dungeon_rooms.rpy", line 6487, in <module>

    $ offered_item_index = store.temp_selected_item_index

AttributeError: 'StoreModule' object has no attribute 'temp_selected_item_index'

Windows-10-10.0.19041 AMD64

Ren'Py 8.3.8.25060602+nightly

Yuki, Pop, Repeat 0.2.1

Tue Nov 11 14:10:16 2025

[/code]

After viewing the dungeon_rooms.rpy file, and checking what changes from version 0.1.6, I made a quick fix on lines 6487 and 7001. This should work for the Trader Room and the Hungry Idol, and solves the error when a Trader or Hungry Idol room is encountered before any Cauldron room (the one where you drop a food or potion item), or when you choose the option to give an item but attempt to exit the item selection menu without picking any items. Since the store.temp_selected_item_index variable is never initialized by a "call screen offer_item_generic(..., cancel_jump_target="cauldron_action_canceled") _result" or  "call screen offer_item_generic(...)" action menu, accessing that undefined attribute directly will rise the AttributeError. The solution is to use a method that returns a default if the value is undefined:

[code]

  File "game/dungeon_rooms.rpy", line 6487 (trader):

    $ offered_item_index = getattr(store, 'temp_selected_item_index', None)

  File "game/dungeon_rooms.rpy", line 7001 (hungry idol):

    $ offered_item_index = getattr(store, 'temp_selected_item_index', None)

[/code]

;)