Page 1 of 1

[Solved]Menu option error

Posted: Thu Dec 14, 2017 6:14 am
by adabella100
I updated my Ren'Py launcher and re-read the tutorial.But when i wrote a code and launched it ,this error came:

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 16: menu statement expects a non-empty block.
    menu:
        ^

Ren'Py Version: Ren'Py 6.99.13.2919
I was so confused,so i created a new game and copied the text from "Choices and Python" to it as to find out where was the error from.It was good at first,but then i added a line before the menu statement:

Code: Select all

define e = Character("Eileen")
label start:
e"Do you mind?"
    menu:

        "Yes, I do.":
            jump choice1_yes

        "No, I don't.":
            jump choice1_no

    label choice1_yes:

        $ menu_flag = True

        e "While creating a multi-path visual novel can be a bit more work, it can yield a unique experience."

        jump choice1_done

    label choice1_no:

        $ menu_flag = False

        e "Games without menus are called kinetic novels, and there are dozens of them available to play."

        jump choice1_done

    label choice1_done:

 
And the same error was caused.
IDK what to do.Please help.

Re: Menu option error

Posted: Thu Dec 14, 2017 6:44 am
by jacobjumper
It's an indentation issue. Try

Code: Select all

e"Do you mind?"

menu:
	"Yes, I do.":
            jump choice1_yes

	"No, I don't.":
         	jump choice1_no

Re: Menu option error

Posted: Thu Dec 14, 2017 10:30 am
by adabella100
jacobjumper wrote: Thu Dec 14, 2017 6:44 am It's an indentation issue. Try

Code: Select all

e"Do you mind?"

menu:
	"Yes, I do.":
            jump choice1_yes

	"No, I don't.":
         	jump choice1_no
I tried that one.I even omitted the colon ( : ),yet nothing happened.idk why.

Re: Menu option error

Posted: Thu Dec 14, 2017 10:51 am
by mitoky

Code: Select all

e"Do you mind?"

    menu:
        "Yes, I do.":
            jump choice1_yes

        "No, I don't.":
            jump choice1_no

Re: Menu option error

Posted: Thu Dec 14, 2017 12:26 pm
by adabella100
mitoky wrote: Thu Dec 14, 2017 10:51 am

Code: Select all

e"Do you mind?"

    menu:
        "Yes, I do.":
            jump choice1_yes

        "No, I don't.":
            jump choice1_no
It is solved now.Thank you so much. :D

Re: Menu option error

Posted: Thu Dec 14, 2017 10:45 pm
by mitoky
adabella100 wrote: Thu Dec 14, 2017 12:26 pm
mitoky wrote: Thu Dec 14, 2017 10:51 am

Code: Select all

e"Do you mind?"

    menu:
        "Yes, I do.":
            jump choice1_yes

        "No, I don't.":
            jump choice1_no
It is solved now.Thank you so much. :D
No problem (: