renpy.display_menu()...
When I have normal values, even lists, or dicts... it works fine.
However, when I use this setup, it fails, giving the error. "list index out of range". Though, it clearly is not. It even displays it. The error shows AFTER selecting the choice.
This just Jumps to the label with the same name as the QST.
QST is a {dict}, with "choices" being a
Code: Select all
label TimeLoop: for i in QST: if QST.get(i)["active"] == True: m = str(QST.get(i)["choices"][1]) renpy.display_menu([(QST.get(i)["question"],None),(m,Jump(str(i)))], interact=True, screen="choice") "annoying infinite loop protection text" jump TimeLoop
Manually setting it to [0] results in the same thing, but it clearly displays the correct values. Selecting the choice will result in the same index error.Code: Select all
label q2: init python: QST.update({ "q2":{ "active":True, "day":"", "time":"", "location":"poolyard", "action":"swim1", "with":"t", "sleep":False, "question":"No-one is looking...", "choices":["Take it!","Run away!"]} })