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.
-
quinnsea
- Regular
- Posts: 52
- Joined: Wed Apr 26, 2017 5:04 pm
- Completed: Birch Sapling
- Projects: Aspen, Baleen
- Organization: Koimarina Games
- IRC Nick: quinnsea
- Soundcloud: nishiikigoi
- itch: koimarina
- Location: Missouri
-
Contact:
#1
Post
by quinnsea » Fri Jun 16, 2017 1:16 am
I'm trying to test out my code, and I have some placeholder names for assets I don't have saved yet. Could that be causing this error? Otherwise, I don't feel like there's anything wrong with it so far...
Code: Select all
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 "G:\renpy-6.99.12.4-sdk\renpy\bootstrap.py", line 295, in bootstrap
renpy.main.main()
File "G:\renpy-6.99.12.4-sdk\renpy\main.py", line 430, in main
renpy.game.script.report_duplicate_labels()
File "G:\renpy-6.99.12.4-sdk\renpy\script.py", line 890, in report_duplicate_labels
if renpy.parser.report_parse_errors():
File "G:\renpy-6.99.12.4-sdk\renpy\parser.py", line 2543, in report_parse_errors
renpy.display.error.report_parse_errors(full_text, error_fn)
File "G:\renpy-6.99.12.4-sdk\renpy\display\error.py", line 179, in report_parse_errors
error_fn=error_fn,
File "G:\renpy-6.99.12.4-sdk\renpy\game.py", line 280, in invoke_in_new_context
return callable(*args, **kwargs)
File "G:\renpy-6.99.12.4-sdk\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 "G:\renpy-6.99.12.4-sdk\renpy\ui.py", line 285, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "G:\renpy-6.99.12.4-sdk\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

quinn / 24 / game design student
icon by church
-
Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
-
Contact:
#2
Post
by Imperf3kt » Fri Jun 16, 2017 1:34 am
The most common cause is duplicate label names or mismatched indentation
Usually it is duplicate labels though - everything, including variables, must be unique and not used more than once unless checking them, jumping to them or changing them
See this recent thread as an example:
viewtopic.php?f=8&t=44434#p457167
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project:
GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
-
quinnsea
- Regular
- Posts: 52
- Joined: Wed Apr 26, 2017 5:04 pm
- Completed: Birch Sapling
- Projects: Aspen, Baleen
- Organization: Koimarina Games
- IRC Nick: quinnsea
- Soundcloud: nishiikigoi
- itch: koimarina
- Location: Missouri
-
Contact:
#3
Post
by quinnsea » Fri Jun 16, 2017 2:00 am
Oh, okay. Yeah, I think that was it. Everything runs pretty smoothly now up until my audio comes up! I'm trying to get it to loop, but I might have the code wrong?
Code: Select all
play music "<loop>music/intromusic.mp3"

quinn / 24 / game design student
icon by church
-
Divona
- Miko-Class Veteran
- Posts: 678
- Joined: Sun Jun 05, 2016 8:29 pm
- Completed: The Falconers: Moonlight
- Organization: Bionic Penguin
- itch: bionicpenguin
-
Contact:
#4
Post
by Divona » Fri Jun 16, 2017 3:54 am
quinnsea wrote:Oh, okay. Yeah, I think that was it. Everything runs pretty smoothly now up until my audio comes up! I'm trying to get it to loop, but I might have the code wrong?
"<loop ???>" is for
partial loop playback. The default of music channel is already set to loop, so you don't have to add anything extra to loop the music. You can add "loop" or "noloop" in as optional. You can get more info from
Play Statement in documentation.
Code: Select all
## Play music, it will loop by default.
play music "music/intromusic.mp3"
## Does the same thing as above.
play music "music/intromusic.mp3" loop
## Play music without loop.
play music "music/intromusic.mp3" noloop
Completed:

Users browsing this forum: No registered users