Problem with making choices menu

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
AlanoodSulaiman
Newbie
Posts: 7
Joined: Wed May 16, 2018 5:46 pm
Contact:

Problem with making choices menu

#1 Post by AlanoodSulaiman »

So I followed this post and copied exactly what's written for a choices menu viewtopic.php?p=407032#p407032 yet it tells me there's an error

Code: Select all

File "game/script.rpy", line 919: menu statement expects a non-empty block.
    menu:
        ^

File "game/script.rpy", line 920: expected statement.
    "Show toy":
              ^

File "game/script.rpy", line 922: expected statement.
    "be cool":
             ^
I know lots of people asked this question before, but I tried the solutions provided for them and it didn't work for me.
Sorry but I really lack the knowloedge on this.

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Problem with making choices menu

#2 Post by kivik »

Can you post your code block (everything in the block leading up to line 919 and a few lines after) for us to see? My guess is that you've got wrong indentations.

AlanoodSulaiman
Newbie
Posts: 7
Joined: Wed May 16, 2018 5:46 pm
Contact:

Re: Problem with making choices menu

#3 Post by AlanoodSulaiman »

kivik wrote: Wed May 16, 2018 6:17 pm Can you post your code block (everything in the block leading up to line 919 and a few lines after) for us to see? My guess is that you've got wrong indentations.
Thank you. I already tried an another formula.

Code: Select all

scene white room
                    show Tairin looking at non-functioning SX
                    Tairin "How could they do such a thing to an innocent being?!"
                    show Tairin leaving angrily
                    Tairin "I'm not staying here!"
                    "Tairing keeps crying out loud."
                    "You losed me as an ally! I'm never following hideous monsters and consedring them my masters!"
                    scene black
 
    menu:
                "He felt his blood was boiling":
                    scene black background
                    show black color
                    
                    "Where am I?"
                    "Did I survive the operation?"
                    "Aviat woke up after he felt that several minutes passed."
                    
                       "He felt his blood was freezing":
                    "Aviat waked up surrounded with blue ights."
                    "As if he was newborn."
                    Aviat "Hello ladies and gentlemen."
                    Tairin "What happened to you?"
                    Aviat "I was teleported here, I assume."
        
This is an another code I tried, but now it tells me "indentation mismatch"

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Problem with making choices menu

#4 Post by Imperf3kt »

Indentation is four spaces per block. When the block ends, you remove the four spaces.
Blocks can stack.

labels go at the very left of the text editor. Everything after the : is part of that block. Anywhere you put a new :, expects a new block.

An indentation mismatch, means a block is in the wrong place. Perhaps 5 spaces or 10.

In your case, your label has far more than four spaces for the next block, try moving all script dialogue so it is spaced four spacebar presses from thevleft of the document.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

AlanoodSulaiman
Newbie
Posts: 7
Joined: Wed May 16, 2018 5:46 pm
Contact:

Re: Problem with making choices menu

#5 Post by AlanoodSulaiman »

re-indented them all
now it tells me this:

Code: Select all

File "game/script.rpy", line 18: choice menuitem expects a non-empty block.
    "He felt his blood was boiling":
                                    ^
I googled this problem, and eveyone says I must add the ":" in the end of my choice, I did it though but seems it's not working.
Thank you again.

User avatar
Alex
Lemma-Class Veteran
Posts: 3093
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Problem with making choices menu

#6 Post by Alex »

Check the "How does indentation work? What are blocks?" paragraph here - https://www.renpy.org/wiki/renpy/doc/FAQ (it is near the bottom of content) to see the graphical explanation.

AlanoodSulaiman
Newbie
Posts: 7
Joined: Wed May 16, 2018 5:46 pm
Contact:

Re: Problem with making choices menu

#7 Post by AlanoodSulaiman »

Alex wrote: Thu May 17, 2018 3:36 am Check the "How does indentation work? What are blocks?" paragraph here - https://www.renpy.org/wiki/renpy/doc/FAQ (it is near the bottom of content) to see the graphical explanation.
Thank you! I fixed it :')

Post Reply

Who is online

Users browsing this forum: Google [Bot], henne