expected menuitem(SOLVED)

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
Nawmie
Newbie
Posts: 3
Joined: Tue Jan 15, 2019 4:29 pm
Tumblr: nawmie
itch: Nawmie
Contact:

expected menuitem(SOLVED)

#1 Post by Nawmie »

I've started with using Ren'Py just recently, so i apologize if it's a silly mistake. I'm using that "The Question" game assets for learning.
I've tried to rewrite this part of the programming a few times already, but it doesn't seem to be working.I don't understand what's wrong.

"file "game/script.rpy",line 33: expected menuitem
->label fazer:

Here are the lines in question:

Code: Select all

 show Sylvie sorrindo
    "Ela se vira para mim e sorri. Ela parece tão acolhedora que eu logo sinto a minha ansiedade desaparacer."
menu:
    "O que eu faço?"
    
    "Fazer a pergunta.":
            jump fazer
    "não falar nada.":
            jump naofalar
    
    label fazer:
    e"Eeeer..."
    e"Você quer...fazer uma Visual Novel comigo?"
    show Sylvie surpresa
    
    label naofalar:
    e"Eeer...esquece..."
    "Melhor deixar isso para depois."
Last edited by Nawmie on Thu Jan 17, 2019 9:38 am, edited 2 times in total.

DannX
Regular
Posts: 99
Joined: Mon Mar 12, 2018 11:15 am
Contact:

Re: expected menuitem

#2 Post by DannX »

The code doesn't seem wrong, I suspect the error might be because identation, but it's hard to tell for sure since the code you posted is not formatted, it would be better that when you post code, you enclose it between code brackets, like this:

[code]
Your code here
[/code]

It will look like this:

Code: Select all

label start:

    "Dialogue"

    menu:
        "O que eu faço?"

        "Fazer a pergunta.":
            jump fazer
        "não falar nada.":
            jump naofalar

label fazer:
    e"Eeeer..."
    e"Você quer...fazer uma Visual Novel comigo?"

label naofalar:
    e"Eeer...esquece..."
    "Melhor deixar isso para depois."    
That previous code snippet is also how it should look like in your projects, including all the spaces, since Python (and therefore Ren'Py) uses those spaces to organize code (that's what I mean with identation).
Last edited by DannX on Wed Jan 16, 2019 12:04 pm, edited 1 time in total.

Nawmie
Newbie
Posts: 3
Joined: Tue Jan 15, 2019 4:29 pm
Tumblr: nawmie
itch: Nawmie
Contact:

Re: expected menuitem

#3 Post by Nawmie »

Thanks for the heads up. I posted it right,now.

User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: expected menuitem

#4 Post by IrinaLazareva »

Indentation is important.

Image

Code: Select all

label start:
    
    show Sylvie sorrindo
    "Ela se vira para mim e sorri. Ela parece tão acolhedora que eu logo sinto a minha ansiedade desaparacer."
    menu:
        "O que eu faço?"
        "Fazer a pergunta.":
            jump fazer
        "não falar nada.":
            jump naofalar
    
label fazer:
    e"Eeeer..."
    e"Você quer...fazer uma Visual Novel comigo?"
    show Sylvie surpresa
    
label naofalar:
    e"Eeer...esquece..."
    "Melhor deixar isso para depois."

Nawmie
Newbie
Posts: 3
Joined: Tue Jan 15, 2019 4:29 pm
Tumblr: nawmie
itch: Nawmie
Contact:

Re: expected menuitem(SOLVED)

#5 Post by Nawmie »

Oh, it worked. Thank you!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot]