I have an inventory system that had been working well in Renpy 7.5, which would store text messages to display them in a scrollable chronological fashion like in Whatsapp, etc. It worked perfectly well in 7.5 but upon upgrading to Renpy 8, an error occurs every time I try to access the phone.
The culprit seems to be the opening line of the screen :
screen wchatnull:
zorder 90
modal True
$ sorted_witems = sorted(inventorywchat.items, key=attrgetter('order'), reverse=False)
$ sorted_itemswchat = sorted_witems
I've played around with removing the line entirely and the game flows again. Can anyone shed some light on what exactly Renpy 8 doesn't like about it?
Thanks,
Liam
-----------------------------
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 16224, in script
show screen wchatnull
File "renpy/common/000statements.rpy", line 588, in execute_show_screen
renpy.show_screen(name, *args, **kwargs)
File "game/screens.rpy", line 6722, in execute
screen wchatnull:
File "game/screens.rpy", line 6722, in execute
screen wchatnull:
File "game/screens.rpy", line 6725, in execute
$ sorted_witems = sorted(inventorywchat.items, key=attrgetter('order'), reverse=False)
File "game/screens.rpy", line 6725, in <module>
$ sorted_witems = sorted(inventorywchat.items, key=attrgetter('order'), reverse=False)
TypeError: '<' not supported between instances of 'RevertableList' and 'int'
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 16224, in script
show screen wchatnull
File "C:\Users\ljbea\Desktop\renpy-8.0.3-sdk\renpy\ast.py", line 2232, in execute
self.call("execute")
File "C:\Users\ljbea\Desktop\renpy-8.0.3-sdk\renpy\ast.py", line 2220, in call
return renpy.statements.call(method, parsed, *args, **kwargs)
File "C:\Users\ljbea\Desktop\renpy-8.0.3-sdk\renpy\statements.py", line 281, in call
return method(parsed, *args, **kwargs)
File "renpy/common/000statements.rpy", line 588, in execute_show_screen
renpy.show_screen(name, *args, **kwargs)
File "C:\Users\ljbea\Desktop\renpy-8.0.3-sdk\renpy\display\screen.py", line 1218, in show_screen
sls.add(_layer, d, _tag, zorder=_zorder, transient=_transient, keep_st=True, name=name)
File "C:\Users\ljbea\Desktop\renpy-8.0.3-sdk\renpy\display\core.py", line 1132, in add
if not self.hide_or_replace(layer, remove_index, "replaced"):
File "C:\Users\ljbea\Desktop\renpy-8.0.3-sdk\renpy\display\core.py", line 1191, in hide_or_replace
if not oldsle.displayable._handles_event(prefix):
File "C:\Users\ljbea\Desktop\renpy-8.0.3-sdk\renpy\display\screen.py", line 500, in _handles_event
self.update()
File "C:\Users\ljbea\Desktop\renpy-8.0.3-sdk\renpy\display\screen.py", line 653, in update
self.screen.function(**self.scope)
File "game/screens.rpy", line 6722, in execute
screen wchatnull:
File "game/screens.rpy", line 6722, in execute
screen wchatnull:
File "game/screens.rpy", line 6725, in execute
$ sorted_witems = sorted(inventorywchat.items, key=attrgetter('order'), reverse=False)
File "game/screens.rpy", line 6725, in <module>
$ sorted_witems = sorted(inventorywchat.items, key=attrgetter('order'), reverse=False)
File "C:\Users\ljbea\Desktop\renpy-8.0.3-sdk\renpy\revertable.py", line 281, in revertable_sorted
return RevertableList(sorted(*args, **kwargs))
TypeError: '<' not supported between instances of 'RevertableList' and 'int'
Windows-10-10.0.22000 AMD64
Ren'Py 8.0.3.22090809
NOIRINHK 1.0
Fri Nov 25 10:32:39 2022