[solved]call label not working from custom screen

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
yuucie
Regular
Posts: 164
Joined: Sun Jun 22, 2014 4:04 am
Completed: NaNoReNo[2015] Those Without Names
Tumblr: an-na-ko
Location: Toronto, Canada
Contact:

[solved]call label not working from custom screen

#1 Post by yuucie »

For some reason it's turning up an error and I have no idea why.

I have an Extras page, which I want to place a message first and then call a screen. Within the screen there are buttons. The buttons will call on a label.

So far it's working, until I click on a button to call the label. It runs up with this error:

While running game code:
File "game/screens.rpy", line 234, in script
call screen Extras
File "renpy/common/000statements.rpy", line 457, in execute_call_screen
store._return = renpy.call_screen(name, *args, **kwargs)
File "renpy/common/00action_menu.rpy", line 128, in __call__
renpy.jump_out_of_context(self.label)
JumpOutException: World1

My code is such:

Code: Select all

label Extras_Screen:
    $ show_quick_menu = False
    scene bg Hallway
    with Dissolve(1.0)
    window show
    "Welcome to the Extra page." with dissolve
    "Here you will find extra notes on the story and the characters."
    window hide
    call screen Extras
    return

screen Extras:

    # This ensures that any other menu screen is replaced.
    tag menu
    
    add "BG/Hallway.png"
    
    imagebutton auto "UI/World_%s.png" action Start(label='World1') hovered Play ("first", "sound/beep1.mp3") xalign 0.5 yalign 0.2 focus_mask True

label World1:
    $ show_quick_menu = False
    stop music fadeout .5
    show blackscreen
    with Dissolve (1.0)
    $renpy.pause(1.0, hard='True')
    window show
    "This is the World page." with dissolve
    
    #Etc, rest of stuff goes here
    

    return
    
    
As far as I can tell, nothing is wrong. But for some reason, I just can't load the label World1 without it crashing. Help please?
Last edited by yuucie on Mon Mar 30, 2015 5:59 pm, edited 1 time in total.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: call label not working from custom screen

#2 Post by trooper6 »

The documentation says that Start is primarily used to start a new game...so that doesn't seems to be a good action to use. Have you tried using Jump('World1') instead?
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
yuucie
Regular
Posts: 164
Joined: Sun Jun 22, 2014 4:04 am
Completed: NaNoReNo[2015] Those Without Names
Tumblr: an-na-ko
Location: Toronto, Canada
Contact:

Re: call label not working from custom screen

#3 Post by yuucie »

Ah yes, now it's working. My bad. Thank you!

Post Reply

Who is online

Users browsing this forum: No registered users