Issue with opening game - [SOLVED]

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
heartfragment
Regular
Posts: 109
Joined: Tue Nov 10, 2015 12:10 am
Projects: Heart Fragment
Tumblr: heartfragment
itch: heartfragment
Contact:

Issue with opening game - [SOLVED]

#1 Post by heartfragment »

Hello everyone. I'm having a bit of an issue loading my game to test it out since I've updated to a newer version of Renpy. Here is the full error.

Code: Select all

I'm sorry, but an uncaught exception occurred.

After initialization, but before game start.
  File "renpy/common/00voice.rpy", line 360, in voice_interact
    if _menu:
NameError: global name '_menu' is not defined

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "C:\Users\taure\Documents\Renpy\renpy\bootstrap.py", line 295, in bootstrap
    renpy.main.main()
  File "C:\Users\taure\Documents\Renpy\renpy\main.py", line 430, in main
    renpy.game.script.report_duplicate_labels()
  File "C:\Users\taure\Documents\Renpy\renpy\script.py", line 890, in report_duplicate_labels
    if renpy.parser.report_parse_errors():
  File "C:\Users\taure\Documents\Renpy\renpy\parser.py", line 2543, in report_parse_errors
    renpy.display.error.report_parse_errors(full_text, error_fn)
  File "C:\Users\taure\Documents\Renpy\renpy\display\error.py", line 179, in report_parse_errors
    error_fn=error_fn,
  File "C:\Users\taure\Documents\Renpy\renpy\game.py", line 280, in invoke_in_new_context
    return callable(*args, **kwargs)
  File "C:\Users\taure\Documents\Renpy\renpy\display\error.py", line 43, in call_exception_screen
    return renpy.ui.interact(mouse="screen", type="screen", suppress_overlay=True, suppress_underlay=True)
  File "C:\Users\taure\Documents\Renpy\renpy\ui.py", line 285, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "C:\Users\taure\Documents\Renpy\renpy\display\core.py", line 2519, in interact
    i()
  File "renpy/common/00voice.rpy", line 360, in voice_interact
    if _menu:
NameError: global name '_menu' is not defined

Windows-8-6.2.9200
Ren'Py 6.99.12.4.2187
Heart Fragment DEMO
If anyone can help me fix what this issue is that would be great, because I'm having no luck finding out what to do!
Last edited by heartfragment on Sun Apr 30, 2017 12:51 am, edited 1 time in total.
Published Project:
Image

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Issue with opening game - file renpy/common/00voice.rpy

#2 Post by Divona »

This issue likely cause by having duplicate label name.

Code: Select all

label name_a:

    . . .

label name_a:

    . . .
Completed:
Image

User avatar
heartfragment
Regular
Posts: 109
Joined: Tue Nov 10, 2015 12:10 am
Projects: Heart Fragment
Tumblr: heartfragment
itch: heartfragment
Contact:

Re: Issue with opening game - file renpy/common/00voice.rpy

#3 Post by heartfragment »

The only label that I've found I have duplicates of is

Code: Select all

label after_menu:
And I'm unsure if this would cause the issue; would it? I looked up online and that seems to be the correct way to end a menu choice. If I'm wrong please correct me though!
Published Project:
Image

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

Re: Issue with opening game - file renpy/common/00voice.rpy

#4 Post by Imperf3kt »

This is the most common issue that causes the error you got. Just do a quick forum search on name _menu is not defined.
Yes it will cause you headaches, rename one of them.
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

User avatar
heartfragment
Regular
Posts: 109
Joined: Tue Nov 10, 2015 12:10 am
Projects: Heart Fragment
Tumblr: heartfragment
itch: heartfragment
Contact:

Re: Issue with opening game - file renpy/common/00voice.rpy

#5 Post by heartfragment »

The only way I've been able to fix the script is by removing duplicates of

Code: Select all

label after_menu:
Is this no longer how you end a menu? I'm very confused as to what to do, I've tried removing scenes and every scene works as long as it is the only one with a "label after_menu" in it. If anyone has any advice on how to get around this I'd really appreciate it.
Published Project:
Image

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Issue with opening game - file renpy/common/00voice.rpy

#6 Post by Divona »

heartfragment wrote:The only way I've been able to fix the script is by removing duplicates of

Code: Select all

label after_menu:
Is this no longer how you end a menu? I'm very confused as to what to do, I've tried removing scenes and every scene works as long as it is the only one with a "label after_menu" in it. If anyone has any advice on how to get around this I'd really appreciate it.
To end the menu, you just jump to any label. It doesn't have to be any specific name that you 'must' jump to. You don't even have to jump, you could just write the script below the menu block, and when the player selects a choice in the menu, it will continue there.

Code: Select all

menu:
    "Option 1":
        "You have selected Option 1."

    "Option 2":
        "You have selected Option 2."

"Now the story continue."
Completed:
Image

User avatar
heartfragment
Regular
Posts: 109
Joined: Tue Nov 10, 2015 12:10 am
Projects: Heart Fragment
Tumblr: heartfragment
itch: heartfragment
Contact:

Re: Issue with opening game - file renpy/common/00voice.rpy

#7 Post by heartfragment »

Oh man I feel dumb now, thank you so much! That fixed my issue!
Published Project:
Image

Post Reply

Who is online

Users browsing this forum: Google [Bot]