Page 1 of 1

"Menu statement expects a non-empty block"

Posted: Sun Jul 14, 2013 5:16 am
by Henriquedematos
First of all, yes, I've only been using Ren'Py since yesterday, so I'm still a starter in this.

I've been trying to adapt a book I wrote sometime ago into a multi-path VN. Thanks to the great tutorial, it was all going pretty good and easy to script - Until now. I tried to make my first in-game menu with a simple "Speak to the girl" or "Don't speak to the girl" choice, following the same structure displayed in the tutorial, when the following error showed up when launching the game:

Parsing the script failed. Menu statement expects a non-empty block.

What did I do wrong?

Also, I've been scripting the VN in Notepad. I know there is a specific recommended software to edit the script, but even by using the Notepad there have been no problems until now. Do I need a different software to make in-game menus?

The menu part of the script:

Code: Select all

menu:

"Speak with the girl"
jump choice1_yes

"Ignore her"
jump choice1_no

label choice1_yes:

$ menu_flag = True

"I decided to speak with her."

jump choice1_done

label choice1_no:

$ menu_flag = False

"I realized it wasn't worth it."

jump choice1_done

label choice1_done:

# ...the game continues here.
I'd be grateful if someone could help me, cheers :)

Re: "Menu statement expects a non-empty block"

Posted: Sun Jul 14, 2013 5:31 am
by Ryue
Hi it would be easier to see what is wrong if you put the code into a "code" block instead of a "quote" block.
From what it sounds like its an error with indenting and as quote blocks ddestroy the indenting (code does not), its hard to see where the problem comes from

Re: "Menu statement expects a non-empty block"

Posted: Sun Jul 14, 2013 5:51 am
by Henriquedematos
Wolf wrote:Hi it would be easier to see what is wrong if you put the code into a "code" block instead of a "quote" block.
From what it sounds like its an error with indenting and as quote blocks ddestroy the indenting (code does not), its hard to see where the problem comes from
Updated the original post by doing so. Not sure if it will do much though :?

Re: "Menu statement expects a non-empty block"

Posted: Sun Jul 14, 2013 5:59 am
by Suwamoto
You are missing the ":" and you need to put them into right blocks >w< Like this:

Code: Select all

	menu:

		"Speak with the girl":
			jump choice1_yes

		"Ignore her":
			jump choice1_no

label choice1_yes:

	$ menu_flag = True

	"I decided to speak with her."

	jump choice1_done

label choice1_no:

	$ menu_flag = False

	"I realized it wasn't worth it."

	jump choice1_done

label choice1_done:

	# ...the game continues here.

Re: "Menu statement expects a non-empty block"

Posted: Sun Jul 14, 2013 6:05 am
by Henriquedematos
Suwamoto wrote:You are missing the ":" and you need to put them into right blocks >w< Like this:
It worked! Thanks! :D