Hey I need some help. I'm just starting out with Renpy and I'm trying to learn how to use it. I want to make 3 choices that all lead to an outcome.
When I launch the game it gives the following error:
menu statement expects a non-empty block.
How do I fix it?
menu:
"Who are you?"
jump choice_whoareyou
"I don't trust you"
jump choice_idonttrustyou
"Alright let's go!"
jump choice_alrightletsgo
label choice_whoareyou:
j "Excuse me but, who are you?"
label choice_idonttrustyou:
j "Sorry, but I don't even know who you are. I'm kinda hesitant going with you."
label choice_alrightletsgo:
j "Alright I'll join you."
label choice_done:
Need help with making a menu and creating choices. What am I doing wrong?
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.
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.
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3794
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Need help with making a menu and creating choices. What am I doing wrong?
Take a look at the tutorial game accessible via the launcher.
Your issue is indentation (blank spacing)
Your issue is indentation (blank spacing)
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
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
-
- Veteran
- Posts: 339
- Joined: Wed Sep 24, 2014 5:03 pm
- Organization: Wild Rose Interactive
- Contact:
Re: Need help with making a menu and creating choices. What am I doing wrong?
I'm guessing your code is indented like this:
The issue is that options in a menu need a colon after them, and everything inside a menu choice needs to be indented one more time.
Code: Select all
menu:
"Who are you?"
jump choice_whoareyou
"I don't trust you"
jump choice_idonttrustyou
"Alright let's go!"
jump choice_alrightletsgo
label choice_whoareyou:
j "Excuse me but, who are you?"
label choice_idonttrustyou:
j "Sorry, but I don't even know who you are. I'm kinda hesitant going with you."
label choice_alrightletsgo:
j "Alright I'll join you."
label choice_done:
"This just fills the label. If a label is empty, Ren'Py will crash."
Code: Select all
menu:
"Who are you?":
jump choice_whoareyou
"I don't trust you":
jump choice_idonttrustyou
"Alright let's go!":
jump choice_alrightletsgo
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot], Ocelot