"Unable to find label game_menu" ~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
Broyi
Regular
Posts: 47
Joined: Sat Oct 25, 2014 4:23 pm
Tumblr: broyi
Contact:

"Unable to find label game_menu" ~SOLVED~

#1 Post by Broyi »

Again here I am! :P
Well, I was using even more cookbook codes... (this one)

Code: Select all

##############################################################################
# Pause Menu
#
# By Greeny.
#
screen game_menu:
    tag menu
   
    imagemap:
        ground "gui/ground.png"
        idle "gui/ground.png"
        hover "gui/hover.png"

        hotspot (-1,-1,484,600) action Return()
        hotspot (384,8,134,149) action ShowMenu("save")
        hotspot (522,89,176,127) action ShowMenu("load")
        hotspot (289,244,144,198) action ShowMenu("preferences")
        hotspot (127,193,100,148) action Quit()
And Ren'Py exploded~:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "renpy/common/00gamemenu.rpy", line 166, in script
    jump expression _game_menu_screen
ScriptError: could not find label 'game_menu'.

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

Full traceback:
  File "renpy/common/00gamemenu.rpy", line 166, in script
    jump expression _game_menu_screen
  File "C:\Users\Brian\Desktop\REN'PY\renpy-6.18.1-sdk\renpy\ast.py", line 1480, in execute
    rv = renpy.game.script.lookup(target)
  File "C:\Users\Brian\Desktop\REN'PY\renpy-6.18.1-sdk\renpy\script.py", line 602, in lookup
    raise ScriptError("could not find label '%s'." % str(original))
ScriptError: could not find label 'game_menu'.

Windows-8-6.2.9200
Ren'Py 6.99.3.404
Sample Game
And I have this thing defined. :lol:

Code: Select all

# The game starts here.
label start:
    $ _game_menu_screen = "game_menu"
    #...
...So, any help please?
Last edited by Broyi on Sun May 24, 2015 12:19 am, edited 1 time in total.

User avatar
orz
Regular
Posts: 126
Joined: Tue Apr 21, 2015 10:19 pm
Contact:

Re: "Unable to find label game_menu"

#2 Post by orz »

For one, even though the cookbook calls to put it in after start, it'll cause less issues with rollback if you put that definition into an init.

For two, I put that exact code into a test program and ran across no errors. I was running 6.99, and not 6.18 however. It also worked just fine with the definition in an init.

Doublecheck that you didn't misspell the game_menu screen, I guess.

Broyi
Regular
Posts: 47
Joined: Sat Oct 25, 2014 4:23 pm
Tumblr: broyi
Contact:

Re: "Unable to find label game_menu"

#3 Post by Broyi »

But I'm using Ren'Py 6.99.03.404... :lol:
Anyway, how weird... I just erased the code, saved the script, opened my game, and put it back in... It seems to work fine now. I'll mark this thread as solved. Thanks for your help... :3

User avatar
orz
Regular
Posts: 126
Joined: Tue Apr 21, 2015 10:19 pm
Contact:

Re: "Unable to find label game_menu" ~SOLVED~

#4 Post by orz »

There are several times where you need to completely close out the game and re-open it for some changes to take.

Also I saw the file path for some of the python script and I thought you were running 6.18. Mind blanked out on me I guess.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]