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 »

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: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: Choice menuitem expects a non-empty block.

#2 Post by Scribbles »

use the [.code] and [./code] (without the "."s)
Image - 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 »

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 »

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

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

Re: Choice menuitem expects a non-empty block.

#5 Post by Imperf3kt »

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.

Current project: GGD Mentor

Twitter

Post Reply

Who is online

Users browsing this forum: No registered users