When certain choices are viewable

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Message
Author
J. Datie
Veteran
Posts: 365
Joined: Thu Mar 01, 2007 1:30 am
Contact:

Re: When certain choices are viewable

#16 Post by J. Datie »

SaMeino wrote: Heres what i had to show you

Code: Select all

# The game starts here.
label start:
        menu begin_menu:
        "Prologue":
            jump Prologue_1
        "Act 1"  if act_1:
           jump Act_1:
I'm no Ren'Py expert, but I don't believe "menu" should have a name, and "jump" doesn't need a colon at the end of it. Also, everything that applies to the menu (or anything that ends with a colon) needs to be indented. Try this:

Code: Select all

# The game starts here.
label start:
        menu:
            "Prologue":
                jump Prologue_1
            "Act 1" if act_1:
               jump Act_1

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: When certain choices are viewable

#17 Post by PyTom »

Actually, menu can have an optional name.

Code: Select all

menu hello_world:
     "Hello":
           jump hello
     "World":
           jump world
and

Code: Select all

label hello_world:
menu:
     "Hello":
           jump hello
     "World":
           jump world
are equivalent. I've been de-emphasizing this sort of thing as of late, because it make learning Ren'Py a little more difficult. But it's there for people who want the convenience.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

SaMeino
Regular
Posts: 49
Joined: Tue Jan 26, 2010 9:39 pm
Location: Georgia, USA
Contact:

Re: When certain choices are viewable

#18 Post by SaMeino »

That still doesnt fix my problem T^T
Nya~

User avatar
Alex
Lemma-Class Veteran
Posts: 3093
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: When certain choices are viewable

#19 Post by Alex »

The problem is indentation. This http://www.renpy.org/wiki/renpy/doc/ref ... _Structure should explain it.

As for errors you received:

Code: Select all

On line 32 of C:\Users\Alex Nguyen\Desktop\renpy-6.10.2\Goddess Selection/game/script.rpy: menu statement expects a non-empty block.
menu begin_menu:
On line 32 you starts a "menu begin_menu" block (the line ends with colon), so next lines should have additional spaces at the beginning to let Ren`py know that this lines are inside of this block. But in your example, there are no lines with additional spaces, so Ren`py thought that "menu begin_menu" block is empty and returned you an error message.

On lines 33 and 35 you tried to make menu choices, but because of indentation mistakes Ren`py doesn`t recognize it, and thought that you have missed the statements (like "show", "scene", "if", "jump" etc.)

Code: Select all

# The game starts here.
label start:
        menu begin_menu:
            "Prologue":
                jump Prologue_1
            "Act 1"  if act_1:
                jump Act_1

SaMeino
Regular
Posts: 49
Joined: Tue Jan 26, 2010 9:39 pm
Location: Georgia, USA
Contact:

Re: When certain choices are viewable

#20 Post by SaMeino »

Alex wrote:The problem is indentation. This http://www.renpy.org/wiki/renpy/doc/ref ... _Structure should explain it.

As for errors you received:

Code: Select all

On line 32 of C:\Users\Alex Nguyen\Desktop\renpy-6.10.2\Goddess Selection/game/script.rpy: menu statement expects a non-empty block.
menu begin_menu:
On line 32 you starts a "menu begin_menu" block (the line ends with colon), so next lines should have additional spaces at the beginning to let Ren`py know that this lines are inside of this block. But in your example, there are no lines with additional spaces, so Ren`py thought that "menu begin_menu" block is empty and returned you an error message.

On lines 33 and 35 you tried to make menu choices, but because of indentation mistakes Ren`py doesn`t recognize it, and thought that you have missed the statements (like "show", "scene", "if", "jump" etc.)

Code: Select all

# The game starts here.
label start:
        menu begin_menu:
            "Prologue":
                jump Prologue_1
            "Act 1"  if act_1:
                jump Act_1
TY ^^

Got it fixed after doing what you said then indenting everything else x.x
Nya~

User avatar
curry nochi rice
Miko-Class Veteran
Posts: 746
Joined: Sat Mar 27, 2010 3:12 am
Projects: Delicatessen, Whom to Notice, Start of Something, Love Sorcery
Organization: Circle Cosine
IRC Nick: Curry
Skype: after.curry.rice
itch: project-rothera
Contact:

Re: When certain choices are viewable

#21 Post by curry nochi rice »

mind if i post my problem here too? it's kinnda similar anyway...

From the start:
"Go with heroine 1"
"Go with heroine 2"

eg. I you select heroine 1 which offers you two choices:

"Really?"
"how about the heroine 2 ?"

hen you choose 2nd option (Which suggests you go with the other heroine). should i use call so that i'tll go back to first menu or should i jump directly to the label where you approach heroine 2?
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

Enerccio
Miko-Class Veteran
Posts: 616
Joined: Thu Oct 26, 2006 4:23 pm
Projects: My Teacher; Songs of Araiah; Something new; Possible Cross Bomber?
Location: Slovakia, Kosice
Contact:

Re: When certain choices are viewable

#22 Post by Enerccio »

curry nochi rice wrote:mind if i post my problem here too? it's kinnda similar anyway...

From the start:
"Go with heroine 1"
"Go with heroine 2"

eg. I you select heroine 1 which offers you two choices:

"Really?"
"how about the heroine 2 ?"

hen you choose 2nd option (Which suggests you go with the other heroine). should i use call so that i'tll go back to first menu or should i jump directly to the label where you approach heroine 2?
do none
these kind of confirmation menus are annoying
unless you are trying to be funny, then it's okay
Image
http://www.bishojo.tk is technically ONLINE!
Songs of Araiah promo: http://www.youtube.com/watch?v=CalchucuoDU

User avatar
curry nochi rice
Miko-Class Veteran
Posts: 746
Joined: Sat Mar 27, 2010 3:12 am
Projects: Delicatessen, Whom to Notice, Start of Something, Love Sorcery
Organization: Circle Cosine
IRC Nick: Curry
Skype: after.curry.rice
itch: project-rothera
Contact:

Re: When certain choices are viewable

#23 Post by curry nochi rice »

^ i'm just going to use it once, during the days where the player would feel indecisive about his girlfriend (h2)and opt to choose h1 instead... you know, the part where you select h1 and tells you to go with your gf instead (and you loose points for selecting h1 in these challenging times)...(trying to be funny too, and painful)

something like this:
*A little spoiler:
Image
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

Post Reply

Who is online

Users browsing this forum: No registered users