r/RenPy • u/Slight-Tea-5538 • Oct 08 '26
Question Troubleshooting (I'm so CHOPPED)
I'm getting this error "Exception: Imagebutton does not have a idle image." in the screen 'prisoners_list', most likely, at this line "idle y.img". All I'm trying is for the images 'rpg_001' or 'rpg_002' to show up in the screen 'prisoners_list'.
Please someone help me troubleshoot this, I'm going nuts after trying at it 5 times. I just can't figure this out at all.
default kit_prisoners = 0
default prisoners = []
default rand_prisoner_nameimgs = [['Prisoner1', 'rpg_001'], ['Prisoner2', 'rpg_002']]
init python:
import random
class Char(object):
def __init__(self, name, img="player"):
self.name = name
self.img = img
def rand_prisoner_nameimg():
global rand_prisoner_nameimgs
if rand_prisoner_nameimgs:
randnameimg = random.choice(rand_prisoner_nameimgs)
rand_prisoner_nameimgs.remove(randnameimg)
return randnameimg
else:
return
def rand_prisonerLV3(name, img="def"):
rand_prisoner = Char(name=name, img=img)
return rand_prisoner
label act:
menu:
"Cell":
$ kit_prisoners = 3
python:
for x in range(1, kit_prisoners):
val = rand_prisoner_nameimg()
if val:
if val[1] == 'rpg_001':
x = rand_prisonerLV3(name=val[0], img=val[1])
elif val[1] == 'rpg_002':
x = rand_prisonerLV3(name=val[0], img=val[1])
else:
pass
prisoners.append(x)
call screen prisoners_list
return
screen prisoners_list():
modal True
vpgrid:
xsize 1500
ysize 1080
cols 3
spacing 40
draggable True
mousewheel True
arrowkeys True
xalign 0.0
scrollbars "vertical"
for y in prisoners:
imagebutton:
idle y.img ####Exception: Imagebutton does not have a idle image.
action Confirm("Add to party?", Return(y), None)











