Page 1 of 1

Ren'Py error : "list indices must be integers, not Choicereturn"

Posted: Wed Feb 13, 2019 6:15 am
by Alysock
Hi. I just started creating on Ren' Py and I am still trying to understand how it works.

I am actually trying to create a little game, and I followed every instructions of the tutorial, but when I launch my game, at the moment of a choice, there is an error.

It shows me :
Capture d’écran 2019-02-13 à 08.45.33.png
Here is my script where there is the error :
Capture d’écran 2019-02-13 à 11.12.53.png
The game is in French but It doesn't change the script that is still in English.

I don't know what to change to correct it... Can you help me ?

Thank you.

Re: Ren'Py error : "list indices must be integers, not Choicereturn"

Posted: Thu Feb 14, 2019 2:01 pm
by xavimat
We need to see what's before the "menu" line.
Menus are actually inside labels, so it should be indented, and some "label something:" should be before it.

Renpy sometimes does not complain with odd indents, like your "jump" lines, that should be inside the labels (so indented too), but probably work OK without the indent. But I think it's best practice to indent everything that should be indented.

Re: Ren'Py error : "list indices must be integers, not Choicereturn"

Posted: Thu Mar 21, 2019 10:31 am
by bueraque
I have the same mistake. What to do with it? Help please.

Re: Ren'Py error : "list indices must be integers, not Choicereturn"

Posted: Thu Mar 21, 2019 7:33 pm
by isobellesophia
The label jumps, look at it. The line is not correctly indented. You have to make the line straight just like the M character. Should be.

Code: Select all

label choix1_Oui:
    M "Blah blah."

    jump choix1_fin  #<--- must be like that.
Do it like that in all jumps.