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

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Alysock
Newbie
Posts: 1
Joined: Wed Feb 13, 2019 3:39 am
Contact:

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

#1 Post 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.

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

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

#2 Post 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.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

bueraque
Newbie
Posts: 7
Joined: Fri Dec 21, 2018 5:12 am
Contact:

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

#3 Post by bueraque »

I have the same mistake. What to do with it? Help please.

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

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

#4 Post 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.
I am a friendly user, please respect and have a good day.


Image

Image


Post Reply

Who is online

Users browsing this forum: Google [Bot]