Choices in ren'py? D:

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Post Reply
Message
Author
FabioKun
Newbie
Posts: 8
Joined: Tue Dec 25, 2018 5:11 pm
Contact:

Choices in ren'py? D:

#1 Post by FabioKun »

So, as an experiment i wanted to implement a small choice in the game, but i get a weird error, ik something is wrong in the script, i dont know what.If i could get some help...

Code: Select all

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/script.rpy", line 398: indentation mismatch.

Ren'Py Version: Ren'Py 7.1.3.1092
Sun Mar 24 21:48:31 2019
Here is the code from when i started the menu thing:

Code: Select all



a "You look paler than me, what happened?"
    
    menu:
    
        "Tell the truth.":
               
               jump truth
               
        "Hide the truth.":
             
                jump lie
                
       label truth:
           
           j "I met a strange person on the way back saying he is my brother, i find it hard to trust him and i was a little bit shocked, I'll be fine."
           
           hide a1
           show a8
           
           a "Oh my...*cough*, thats bad, you should contact the police."
           
           j "I'm sure it will be fine, i dont want needless troubles."
           
           hide a8
           show a1
           
           a "If you say so..."
           
       label lie:
           
           j "It's nothing, just very hot outside."
           
           a "Oh, i see..."
           
           label after_menu:
               
    a "Anyway, i should go home now, thank you for everything Jeanne."
    
    j "No problem, feel free to drop by anytime!"
    
Last edited by FabioKun on Sun Mar 24, 2019 5:08 pm, edited 1 time in total.

User avatar
parttimestorier
Veteran
Posts: 429
Joined: Thu Feb 09, 2017 10:29 pm
Completed: No Other Medicine, Well Met By Moonlight, RE:BURN, The Light at the End of the Ocean, Take A Hike!, Wizard School Woes
Projects: Seeds of Dreams
itch: janetitor
Location: Canada
Contact:

Re: Choices in ren'py? D:

#2 Post by parttimestorier »

It looks like the issue is with the indentation. You have "label truth" and "label lie" indented as if they're part of the menu. The labels themselves shouldn't be indented at all, and the text below them should only be indented once, like the example you get when you first create the project.
ImageImageImage

FabioKun
Newbie
Posts: 8
Joined: Tue Dec 25, 2018 5:11 pm
Contact:

Re: Choices in ren'py? D:

#3 Post by FabioKun »

Can you explain for me a little bit in more detail?I'm new to this and idk what do you mean by indented.i will over the tutorial again.

User avatar
parttimestorier
Veteran
Posts: 429
Joined: Thu Feb 09, 2017 10:29 pm
Completed: No Other Medicine, Well Met By Moonlight, RE:BURN, The Light at the End of the Ocean, Take A Hike!, Wizard School Woes
Projects: Seeds of Dreams
itch: janetitor
Location: Canada
Contact:

Re: Choices in ren'py? D:

#4 Post by parttimestorier »

I mean how far removed it is from the left margin.

Code: Select all

This text here isn't indented at all.
	This text is indented further.
		This text is indented even further.
ImageImageImage

User avatar
Donmai
Eileen-Class Veteran
Posts: 1958
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Choices in ren'py? D:

#5 Post by Donmai »

Hi, FabioKun. You will get more answers if you ask in the Ren'Py section of the forum: viewforum.php?f=8&sid=a6c30e5307ea8cd7f5f79f5df2a90f12
Indentation is explained here: https://www.renpy.org/doc/html/language ... and-blocks
If you are new to Ren'Py, then reading the Quickstart is a good way to get, err... quickstarted :) : https://www.renpy.org/doc/html/quickstart.html
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

TheMCButterfly
Newbie
Posts: 17
Joined: Sat Mar 30, 2019 12:16 pm
Projects: Friends Forever - Talk to a character
IRC Nick: Butterfly
Contact:

Re: Choices in ren'py? D:

#6 Post by TheMCButterfly »

Just do this:

Code: Select all

a "You look paler than me, what happened?"

    menu:

        "Tell the truth.":

            jump truth

        "Hide the truth.":

                jump lie

label truth:

    j "I met a strange person on the way back saying he is my brother, i find it hard to trust him and i was a little bit shocked, I'll be fine."

    hide a1
    show a8

    a "Oh my...*cough*, thats bad, you should contact the police."

    j "I'm sure it will be fine, i dont want needless troubles."

    hide a8
    show a1

    a "If you say so..."

label lie:

    j "It's nothing, just very hot outside."

    a "Oh, i see..."

label after_menu:

    a "Anyway, i should go home now, thank you for everything Jeanne."

    j "No problem, feel free to drop by anytime!"

Post Reply

Who is online

Users browsing this forum: No registered users