Another error that won't let me load my game.. :/

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
Owl.Child
Newbie
Posts: 15
Joined: Thu Feb 16, 2017 9:07 pm
Tumblr: petrichorstudent
Deviantart: killingoneafterone
itch: owl.child
Contact:

Another error that won't let me load my game.. :/

#1 Post by Owl.Child »

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\carm1\Downloads\renpy-6.99.12.3-sdk\renpy\bootstrap.py", line 295, in bootstrap
    renpy.main.main()
  File "C:\Users\carm1\Downloads\renpy-6.99.12.3-sdk\renpy\main.py", line 430, in main
    renpy.game.script.report_duplicate_labels()
  File "C:\Users\carm1\Downloads\renpy-6.99.12.3-sdk\renpy\script.py", line 890, in report_duplicate_labels
    if renpy.parser.report_parse_errors():
  File "C:\Users\carm1\Downloads\renpy-6.99.12.3-sdk\renpy\parser.py", line 2543, in report_parse_errors
    renpy.display.error.report_parse_errors(full_text, error_fn)
  File "C:\Users\carm1\Downloads\renpy-6.99.12.3-sdk\renpy\display\error.py", line 179, in report_parse_errors
    error_fn=error_fn,
  File "C:\Users\carm1\Downloads\renpy-6.99.12.3-sdk\renpy\game.py", line 280, in invoke_in_new_context
    return callable(*args, **kwargs)
  File "C:\Users\carm1\Downloads\renpy-6.99.12.3-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 "C:\Users\carm1\Downloads\renpy-6.99.12.3-sdk\renpy\ui.py", line 285, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "C:\Users\carm1\Downloads\renpy-6.99.12.3-sdk\renpy\display\core.py", line 2500, 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.3.2123
Notomorii 1.0

User avatar
indoneko
Miko-Class Veteran
Posts: 528
Joined: Sat Sep 03, 2016 4:00 am
Contact:

Re: Another error that won't let me load my game.. :/

#2 Post by indoneko »

What did you edit in 00voice.rpy? can you post it here?
My avatar is courtesy of Mellanthe

Owl.Child
Newbie
Posts: 15
Joined: Thu Feb 16, 2017 9:07 pm
Tumblr: petrichorstudent
Deviantart: killingoneafterone
itch: owl.child
Contact:

Re: Another error that won't let me load my game.. :/

#3 Post by Owl.Child »

indoneko wrote:What did you edit in 00voice.rpy? can you post it here?
That's just the thing, I've only edited script.rpy and gui.rpy. I haven't touched 00voice.rpy so I'm not sure why I'm getting this error :/

User avatar
indoneko
Miko-Class Veteran
Posts: 528
Joined: Sat Sep 03, 2016 4:00 am
Contact:

Re: Another error that won't let me load my game.. :/

#4 Post by indoneko »

Ok, can you post your script here?
My avatar is courtesy of Mellanthe

Owl.Child
Newbie
Posts: 15
Joined: Thu Feb 16, 2017 9:07 pm
Tumblr: petrichorstudent
Deviantart: killingoneafterone
itch: owl.child
Contact:

Re: Another error that won't let me load my game.. :/

#5 Post by Owl.Child »

indoneko wrote:Ok, can you post your script here?

Code: Select all

# The script of the game goes in this file.
define n = Character("Narrator")
define pov = ("[povname!t]")
define w = ("???")
define povg = ("[povgender!t]")
define j = ("Jasper")  
define she = ("she")
define he = ("he")
define b = ("Belamy")
define s = ("Sam")
label start:

image room = "Flower.jpg"
image cold = "rain-day.jpg"
image blank = "black-screen.png"

scene blank
$ povname = renpy.input(_("What is your name?"))
pov   "My name is [povname!t]."

scene blank
"What is your gender?"

menu:
    "she":
        $ povgender = "she" 
    "he":
        $ povgender = "he" 

if povgender == "she":
    pov "I prefer she."

elif povgender == "he":
    pov "I prefer he."

scene blank
n "Well, [povname!t]"
n "This is where your life will be changed."
n " Choose your path wisely ... "
scene cold
pov "How did I get here..."
pov "It's so c-cold..."
"You shiver violently"
pov "Gosh.. I dont even recognize this place..."
pov "This hideout is all I have right now..."
pov "It feels awfully like home..."
pov "I have been walking too long I think I'll just... take a... little... nap..."
"You doze off"
scene blank
".."

"...."

"......"


w "is [povgender!t] awake?"

w "I don't know.."

"You groan, your body is sore yet you're not sure why"

pov "Mom.. Dad.. five more minutes..."

w "ummm..."

w "Jaspar... [povgender!t] thinks you're..."

" One of them starts laughing histerically"

w "shut up!"

"You slowly open your eyes to show three young men"

pov "h-huh?!?!"

w "Oh.. Hi there.."

if povgender == "he":
    w "Jasper calm him down.."

elif povgender == "she":
    w "Jasper calm her down.."

j "o-oh uh... sure... (He nods a bit unsure)"

pov "w-what are yo-"

"Jasper pulls you into a warm embrace"
"You choose to..."
menu:
    "Push him away":
        $ you = "No"
    "Smile and hug back": 
        $ you = "Yes"
        
if you == "Yes":
    "You weirdly enjoy his embrace"
    "Jasper smiles"
    jump nervous
    
if you == "No":
    pov "!"
    j "Oh uh.. s-sorry.."
    jump anxious  
    
label nervous:
     w "There ya go Jasper. [povgender!t]'s all better"
     j "..."
     pov "..."
     j "..."
     "the two other men start laughing hysterically" 
     jump contin    

    
label anxious:
     w "Way to go Jasper! [povgender!t]'s scared!"
     "Jasper pulls away quickly"
     j "s-sorry..."  
     jump contin


label contin:
     pov "w-who are you.. Where am I?"
     "you look around starting to let the situation sink in"
    
w "Belamy can't you do something..?"
"Belamy sighs and sits on the end of the bed you're sitting on."
w "Well..?"
b "alright.."
"you close your eyes tightly not sure of what to expect"
b "Sam, I.. I can't do this.."
s "God damnit Belamy.."
"You look around at the three guys."
j "A-are you alright?"

menu:
    "Freak out":
        $ uh = "oops"
       
        s "'sighs'"
    "Cry":
        $ uh = "sad"

    "nod":
        $ uh = "lie"
        
if uh == "oops":
    jump scared

if uh == "sad":
    jump ohno
    
if uh == "lie":
    jump awe

label scared:
 pov "I-I..."
 pov "I'M SCARED AND I'M LOST AND I HAVE NO IDEA WJO YOU THREE ARE AND I'M RETHINKING MY ENTIRE LIFE AND I HAVE NO IDEA WHAT TO DO AN-"
 
if povgender == "she":
    w "Calm down woman!"
    
if povgender == "he":
    w "Dude, calm down!"
    jump contin2
 
label ohno:
    pov "I-I..."
    "You burst into tears."
    "the three men look at eachother not knowing what to do"
    jump contin2
 
label awe:
 pov "Y-yeah.. everything's just.. fine.."
 "You sigh to yourself"
 jump contin2
 
label contin2:
 s "Alright..."
 b "Sam, did you want me to explain?"
 "Jasper and Sam look away"
 b "I'll take that as a.. yes.."
 "Belamy takes a deep breath and looks at his hands, fiddling with a piece of fluff from the blanket"
 s "we uh.."
 b "Sam it's okay.. I've got this.."
 j "W-we uh.."
 b "Long story short.. We found you passed out in one of the old townhouses.."
 pov "Why were you in the townhouses...?"
 "The three look away, avoiding the question."
 
 menu:
     "Pressure them":
        $ op = "pressure"
     "Let it be":
        $ op = "calm"
        
if op == "pressure":
    jump press
if op == "calm":
    jump contin3
    
label press:
    pov "Why were you in the town. Houses."
    "The boys sigh simultaneously"
    s "We were looking for-"
    j "A book"
    pov "In the townhouses?"
    s "Yes."
    b "It's not important.."
    jump contin3
    
label contin3:
    pov "Alright..."
    s "Anyways.."
    s "I'm Sam. This is my brother Jeremy and thi-"
    
if povgender == "she":
    b "I'm Belamy m'lady.."
    
if povgender == "he":
    b "I'm Belamy, handsome.."
    
menu:
    "Introduce yourself":
        $ ch = "IY"
        
    "Stay quiet":
        $ ch = "SI"
        
label IY:
    pov "I'm uh.. I'm [povname!t]"
    s "Well, as weird as these circumstances are, it's nice to meet you.. [povname!t]"
    b "I agree Sam.. don't you Jeremy?"
    j "'Nods silently'"
    "you feel around your pockets looking for your cellphone only to realise you forgot it at home"
    pov "oh god.." 
    "you sigh"
    jump contin4
    
label SI:
    "You stay silent, not sure what to make of the situation"
    b "are you alright..?"
    j "I-I think [povgender!t]'s s-scared still.."
    s "'sighs'"
    s "do you have any ID?"
    "You feel around in your pockets only to relize you left it at home"
    pov "oh god..." 
    "you sigh"
    jump contin4
    
    
label contin4:
    s "what is it?"
    
    
if ch == "IY":
    jump IY
    
label IY:
    pov "I.. I don't have my cell.."
    s "We don't own any phones either..."
    b "There's a payphone on the corner of the street, why don't we go when it clears up?"
    "Belamy looks out the window sighing a bit"
    "You follow his lead and look out of the window"
    pov "Sounds great.. Thank you.."
    jump contin_
    
if ch == "SI":
    jump SI
    
label SI:
    pov "I-I... my wallet..." 
    "You look down and sigh"
    s "Well.. that's alright.. Do you remember your name at least?"
    pov "Y-yeah.. It's [povname!t].."
    b "What a lovely name.."
    pov "Th-thak you.."
    jump contin_
    
label contin_:
    b "It's really no problem."
    "Belamy smiles warmly at you"
    # This ends the game.

return

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: Another error that won't let me load my game.. :/

#6 Post by Divona »

What was the last thing you did before the error appeared?

Also, tab indentation in the script is all over the places. There are "if" and "menu" block outside label, indentation not consistent. Best fix them as well to avoid Ren'Py or Python freaking out.
Completed:
Image

Owl.Child
Newbie
Posts: 15
Joined: Thu Feb 16, 2017 9:07 pm
Tumblr: petrichorstudent
Deviantart: killingoneafterone
itch: owl.child
Contact:

Re: Another error that won't let me load my game.. :/

#7 Post by Owl.Child »

Divona wrote:What was the last thing you did before the error appeared?

Also, tab indentation in the script is all over the places. There are "if" and "menu" block outside label, indentation not consistent. Best fix them as well to avoid Ren'Py or Python freaking out.
I added this menu

Code: Select all

menu:
    "Introduce yourself":
        $ ch = "IY"
        
    "Stay quiet":
        $ ch = "SI"
        
label IY:
    pov "I'm uh.. I'm [povname!t]"
    s "Well, as weird as these circumstances are, it's nice to meet you.. [povname!t]"
    b "I agree Sam.. don't you Jeremy?"
    j "'Nods silently'"
    "you feel around your pockets looking for your cellphone only to realise you forgot it at home"
    pov "oh god.." 
    "you sigh"
    jump contin4
    
label SI:
    "You stay silent, not sure what to make of the situation"
    b "are you alright..?"
    j "I-I think [povgender!t]'s s-scared still.."
    s "'sighs'"
    s "do you have any ID?"
    "You feel around in your pockets only to relize you left it at home"
    pov "oh god..." 
    "you sigh"
    jump contin4
    
    
label contin4:
    s "what is it?"
    
    
if ch == "IY":
    jump IY
    
label IY:
    pov "I.. I don't have my cell.."
    s "We don't own any phones either..."
    b "There's a payphone on the corner of the street, why don't we go when it clears up?"
    "Belamy looks out the window sighing a bit"
    "You follow his lead and look out of the window"
    pov "Sounds great.. Thank you.."
    jump contin_
    
if ch == "SI":
    jump SI
    
label SI:
    pov "I-I... my wallet..." 
    "You look down and sigh"
    s "Well.. that's alright.. Do you remember your name at least?"
    pov "Y-yeah.. It's [povname!t].."
    b "What a lovely name.."
    pov "Th-thak you.."
    jump contin_
    
label contin_:
    b "It's really no problem."
    "Belamy smiles warmly at you"
    # This ends the game.

return

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: Another error that won't let me load my game.. :/

#8 Post by Divona »

Make sure you indent "if" and "menu" within label block:

Code: Select all

label contin3:
    pov "Alright..."
    s "Anyways.."
    s "I'm Sam. This is my brother Jeremy and thi-"
    
    if povgender == "she":
        b "I'm Belamy m'lady.."
    
    if povgender == "he":
        b "I'm Belamy, handsome.."
    
    menu:
        "Introduce yourself":
            $ ch = "IY"
        
        "Stay quiet":
            $ ch = "SI"
Also, you have duplicate label names "IY" and "SI". This is what causing the error.:

Code: Select all

label IY:
    pov "I'm uh.. I'm [povname!t]"
    s "Well, as weird as these circumstances are, it's nice to meet you.. [povname!t]"
    b "I agree Sam.. don't you Jeremy?"
    j "'Nods silently'"
    "you feel around your pockets looking for your cellphone only to realise you forgot it at home"
    pov "oh god.."
    "you sigh"
    jump contin4

label SI:
    "You stay silent, not sure what to make of the situation"
    b "are you alright..?"
    j "I-I think [povgender!t]'s s-scared still.."
    s "'sighs'"
    s "do you have any ID?"
    "You feel around in your pockets only to relize you left it at home"
    pov "oh god..."
    "you sigh"
    jump contin4

label contin4:
    s "what is it?"

    if ch == "IY":
        jump iy

label IY:
    pov "I.. I don't have my cell.."
    s "We don't own any phones either..."
    b "There's a payphone on the corner of the street, why don't we go when it clears up?"
    "Belamy looks out the window sighing a bit"
    "You follow his lead and look out of the window"
    pov "Sounds great.. Thank you.."
    jump contin_

    if ch == "SI":
        jump SI

label SI:
    pov "I-I... my wallet..."
    "You look down and sigh"
    s "Well.. that's alright.. Do you remember your name at least?"
    pov "Y-yeah.. It's [povname!t].."
    b "What a lovely name.."
    pov "Th-thak you.."
    jump contin_
Last edited by Divona on Sat Feb 18, 2017 1:14 pm, edited 1 time in total.
Completed:
Image

Owl.Child
Newbie
Posts: 15
Joined: Thu Feb 16, 2017 9:07 pm
Tumblr: petrichorstudent
Deviantart: killingoneafterone
itch: owl.child
Contact:

Re: Another error that won't let me load my game.. :/

#9 Post by Owl.Child »

Divona wrote:Make sure you indent "if" and "menu" within label block:

Code: Select all

label contin3:
    pov "Alright..."
    s "Anyways.."
    s "I'm Sam. This is my brother Jeremy and thi-"
    
    if povgender == "she":
        b "I'm Belamy m'lady.."
    
    if povgender == "he":
        b "I'm Belamy, handsome.."
    
    menu:
        "Introduce yourself":
            $ ch = "IY"
        
        "Stay quiet":
            $ ch = "SI"
I've been going back and fixing indentations but every time I do it says this

Code: Select all

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/script.rpy", line 24: Line is indented, but the preceding say statement statement does not expect a block. Please check this line's indentation.
    menu:
    ^

File "game/script.rpy", line 79: Line is indented, but the preceding say statement statement does not expect a block. Please check this line's indentation.
    if povgender == "he":
    ^

File "game/script.rpy", line 91: Line is indented, but the preceding say statement statement does not expect a block. Please check this line's indentation.
    menu:
    ^

File "game/script.rpy", line 137: Line is indented, but the preceding say statement statement does not expect a block. Please check this line's indentation.
    menu:
    ^

File "game/script.rpy", line 161: Line is indented, but the preceding say statement statement does not expect a block. Please check this line's indentation.
    if povgender == "she":
    ^

File "game/script.rpy", line 192: Line is indented, but the preceding say statement statement does not expect a block. Please check this line's indentation.
    menu:
    ^

Ren'Py Version: Ren'Py 6.99.12.3.2123

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: Another error that won't let me load my game.. :/

#10 Post by Divona »

Here is the script with proper indent and no duplicate labels.
Attachments
script.rpy
(6.44 KiB) Downloaded 311 times
Completed:
Image

Owl.Child
Newbie
Posts: 15
Joined: Thu Feb 16, 2017 9:07 pm
Tumblr: petrichorstudent
Deviantart: killingoneafterone
itch: owl.child
Contact:

Re: Another error that won't let me load my game.. :/

#11 Post by Owl.Child »

Divona wrote:Here is the script with proper indent and no duplicate labels.
Youère an angel! Thank you so much!

Akemari
Newbie
Posts: 4
Joined: Thu Jun 30, 2016 10:16 am
Contact:

Re: Another error that won't let me load my game.. :/

#12 Post by Akemari »

EDIT: Found my duplicate label on line 2034. Not sure why this error message never triggered until now, but there ya go. Their advice was on point.

Hoi! I am having the same problem. I didn't experience this issue at all until just recently. My computer broke (long story) and I had to load up a version of my game that I saved to my google drive (just in case this exact thing happened). Anyway the version that was saved to my google drive definitely functioned when I saved it, but now when I try to load the game it just says:

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\Mari\Desktop\Dragon Date\renpy-6.99.12.4-sdk\renpy\bootstrap.py", line 295, in bootstrap
    renpy.main.main()
  File "C:\Users\Mari\Desktop\Dragon Date\renpy-6.99.12.4-sdk\renpy\main.py", line 430, in main
    renpy.game.script.report_duplicate_labels()
  File "C:\Users\Mari\Desktop\Dragon Date\renpy-6.99.12.4-sdk\renpy\script.py", line 890, in report_duplicate_labels
    if renpy.parser.report_parse_errors():
  File "C:\Users\Mari\Desktop\Dragon Date\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 "C:\Users\Mari\Desktop\Dragon Date\renpy-6.99.12.4-sdk\renpy\display\error.py", line 179, in report_parse_errors
    error_fn=error_fn,
  File "C:\Users\Mari\Desktop\Dragon Date\renpy-6.99.12.4-sdk\renpy\game.py", line 280, in invoke_in_new_context
    return callable(*args, **kwargs)
  File "C:\Users\Mari\Desktop\Dragon Date\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 "C:\Users\Mari\Desktop\Dragon Date\renpy-6.99.12.4-sdk\renpy\ui.py", line 285, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "C:\Users\Mari\Desktop\Dragon Date\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-7-6.1.7601-SP1
Ren'Py 6.99.12.4.2187
Dragon Date Demo
So I guess my question would be, "Why would copying the folder containing my renpy and my game files cause this error?" and "Could you elaborate on exactly what you did to the previous poster's script to fix it?".

Please and thank you <3

(PS: I can't really drop my script here because it is over 10k lines. >n <)

EDIT: Found my duplicate label on line 2034. Not sure why this error message never triggered until now, but there ya go. Their advice was on point.

chaos-dark-lord
Newbie
Posts: 8
Joined: Sun May 07, 2017 3:59 pm
Deviantart: chaos-dark-lord
Contact:

Re: Another error that won't let me load my game.. :/

#13 Post by chaos-dark-lord »

I received the same error. It did happened that I had a repeated label in another .rpy page (I separate them pér character to make searching easier). So if you get this error ignore the menus and check your labels.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Semrush [Bot]