"Menu statement expects a non-empty block"

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
User avatar
Henriquedematos
Newbie
Posts: 6
Joined: Sun Jul 14, 2013 4:15 am
Contact:

"Menu statement expects a non-empty block"

#1 Post by Henriquedematos » Sun Jul 14, 2013 5:16 am

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 :)
Last edited by Henriquedematos on Sun Jul 14, 2013 5:51 am, edited 2 times in total.

Ryue
Miko-Class Veteran
Posts: 745
Joined: Fri Nov 02, 2012 8:41 am
Projects: Red eyes in the darkness
Contact:

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

#2 Post by Ryue » Sun Jul 14, 2013 5:31 am

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

User avatar
Henriquedematos
Newbie
Posts: 6
Joined: Sun Jul 14, 2013 4:15 am
Contact:

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

#3 Post by Henriquedematos » Sun Jul 14, 2013 5:51 am

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 :?

User avatar
Suwamoto
Regular
Posts: 66
Joined: Wed Sep 05, 2012 7:36 am
Contact:

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

#4 Post by Suwamoto » Sun Jul 14, 2013 5:59 am

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.

User avatar
Henriquedematos
Newbie
Posts: 6
Joined: Sun Jul 14, 2013 4:15 am
Contact:

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

#5 Post by Henriquedematos » Sun Jul 14, 2013 6:05 am

Suwamoto wrote:You are missing the ":" and you need to put them into right blocks >w< Like this:
It worked! Thanks! :D

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], _ticlock_