Okay, now I'm trying to randomize the list and have only 3 actors selectable.
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 90, in script call
call PreProduction
File "game/PreProduction.rpy", line 4, in script call
call CastingCall
File "game/CastingCall.rpy", line 7, in script call
call ActorSelection
File "game/CastingCall.rpy", line 13, in script
menu:
File "game/screens.rpy", line 207, in execute
screen choice(items):
File "game/screens.rpy", line 207, in execute
screen choice(items):
File "game/screens.rpy", line 210, in execute
vbox:
File "game/screens.rpy", line 211, in execute
for i in items:
File "game/screens.rpy", line 212, in execute
textbutton i.caption action i.action
IndexError: list index out of range
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 90, in script call
call PreProduction
File "game/PreProduction.rpy", line 4, in script call
call CastingCall
File "game/CastingCall.rpy", line 7, in script call
call ActorSelection
File "game/CastingCall.rpy", line 13, in script
menu:
File "C:\Renpy\renpy\ast.py", line 1632, in execute
choice = renpy.exports.menu(choices, self.set, args, kwargs, item_arguments)
File "C:\Renpy\renpy\exports\menuexports.py", line 134, in menu
rv = renpy.store.menu(new_items)
File "C:\Renpy\renpy\exports\menuexports.py", line 424, in display_menu
rv = renpy.ui.interact(mouse='menu', type=type, roll_forward=roll_forward)
File "C:\Renpy\renpy\ui.py", line 301, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "C:\Renpy\renpy\display\core.py", line 2218, in interact
repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, pause_modal=pause_modal, **kwargs) # type: ignore
File "C:\Renpy\renpy\display\core.py", line 2748, in interact_core
root_widget.visit_all(lambda d : d.per_interact())
File "C:\Renpy\renpy\display\displayable.py", line 434, in visit_all
d.visit_all(callback, seen)
File "C:\Renpy\renpy\display\displayable.py", line 434, in visit_all
d.visit_all(callback, seen)
File "C:\Renpy\renpy\display\displayable.py", line 434, in visit_all
d.visit_all(callback, seen)
File "C:\Renpy\renpy\display\screen.py", line 480, in visit_all
callback(self)
File "C:\Renpy\renpy\display\core.py", line 2748, in <lambda>
root_widget.visit_all(lambda d : d.per_interact())
File "C:\Renpy\renpy\display\screen.py", line 491, in per_interact
self.update()
File "C:\Renpy\renpy\display\screen.py", line 700, in update
self.screen.function(**self.scope)
File "game/screens.rpy", line 207, in execute
screen choice(items):
File "game/screens.rpy", line 207, in execute
screen choice(items):
File "game/screens.rpy", line 210, in execute
vbox:
File "game/screens.rpy", line 211, in execute
for i in items:
File "game/screens.rpy", line 212, in execute
textbutton i.caption action i.action
File "C:\Renpy\renpy\ui.py", line 1015, in _textbutton
text = renpy.text.text.Text(label, style=text_style, substitute=substitute, scope=scope, **text_kwargs)
File "C:\Renpy\renpy\text\text.py", line 2079, in __init__
self.set_text(text, scope, substitute) # type: ignore
File "C:\Renpy\renpy\text\text.py", line 2216, in set_text
i, did_sub = renpy.substitutions.substitute(i, scope, substitute) # type: ignore
File "C:\Renpy\renpy\substitutions.py", line 373, in substitute
s = interpolate(s, variables) # type: ignore
File "C:\Renpy\renpy\substitutions.py", line 86, in interpolate
raise e
File "C:\Renpy\renpy\substitutions.py", line 78, in interpolate
value = renpy.python.py_eval(code, {}, scope)
File "C:\Renpy\renpy\python.py", line 1218, in py_eval
return py_eval_bytecode(code, globals, locals)
File "C:\Renpy\renpy\python.py", line 1211, in py_eval_bytecode
return eval(bytecode, globals, locals)
File "<none>", line 1, in <module>
File "C:\Renpy\renpy\revertable.py", line 214, in __getitem__
rv = list.__getitem__(self, index)
IndexError: list index out of range
Windows-10-10.0.26100 AMD64
Ren'Py 8.3.7.25031702
PorMa 1.0
Thu May 15 15:49:54 2025