Choice menuitem expects a non-empty block.

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
notanautomaton
Newbie
Posts: 8
Joined: Wed Feb 22, 2017 12:37 am
Contact:

Choice menuitem expects a non-empty block.

#1 Post by notanautomaton » Wed Feb 22, 2017 12:43 am

I'm pretty new to coding anything, and I got the title text when trying to run my game. My current script looks like this:

Code: Select all


    menu:
        
        "Jamelia Belltower, Veteran Agent":
        
        jump jameliabelltower
        
label jameliabelltower:
(Edit: It has the correct indentation, but it's not showing up on the forum and I don't know how to make it do it."

What does it mean, and how do I fix it?

Also, sorry if this isn't the correct forum, I'm pretty new here.

Edit: Yeah, this should have gone in Questions and Announcements probably. Sorry.
Last edited by notanautomaton on Wed Feb 22, 2017 12:54 am, edited 3 times in total.

User avatar
Scribbles
Miko-Class Veteran
Posts: 575
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island
Projects: As We Know It
Organization: Scribble Games
Tumblr: doodlesatbreakfast
Deviantart: breakfastdoodles
itch: scribbles
Location: Georgia
Contact:

Re: Choice menuitem expects a non-empty block.

#2 Post by Scribbles » Wed Feb 22, 2017 12:50 am

use the [.code] and [./code] (without the "."s)
Image - Image

notanautomaton
Newbie
Posts: 8
Joined: Wed Feb 22, 2017 12:37 am
Contact:

Re: Choice menuitem expects a non-empty block.

#3 Post by notanautomaton » Wed Feb 22, 2017 12:55 am

Scribbles wrote:use the [.code] and [./code] (without the "."s)
Thanks. I'll probably be asking a lot of these, sorry for the trouble.

notanautomaton
Newbie
Posts: 8
Joined: Wed Feb 22, 2017 12:37 am
Contact:

Re: Choice menuitem expects a non-empty block.

#4 Post by notanautomaton » Wed Feb 22, 2017 1:30 am

Okay, I figured it out. My indentation was off. jump jameliabelltower should have had one more indent.

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

Re: Choice menuitem expects a non-empty block.

#5 Post by Imperf3kt » Wed Feb 22, 2017 5:31 am

Didn't get a chance to reply earlier.
As you noticed, you needed one more indent of four spaces.

Any time you add a colon (:), you need to indent the next line by four spaces.

Remember to break out of this if you add multiple items to your menu, ex:

Code: Select all

    menu:
        "Jamelia Belltower, Veteran Agent":
            jump jameliabelltower
        "Bob Dole, Some Dude":
            jump bobdole

label jameliabelltower:
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Post Reply

Who is online

Users browsing this forum: No registered users