Error: "JumpOutException" [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
Celestial_Toast
Regular
Posts: 70
Joined: Sun May 03, 2015 7:54 pm
Completed: Circus of Soaring Dreams, Rewind
Projects: Golden Hearts & Crimson Souls
Tumblr: celestialtoastgames
itch: celestial-toast
Contact:

Error: "JumpOutException" [Solved(?)]

#1 Post by Celestial_Toast »

I have a bonus section in my game and it has buttons to the Gallery and Credits. Then the "Return" buttons on these pages link back to the bonus page.

It works the first time, and then throws an error next time and immediately closes the game.

the code for the Return buttons is:
textbutton "Return" action Start("bonus")

The code under my bonus label:
label bonus:
scene bg outsideMorning
menu:
"Gallery":
call screen cg_gallery
"Credits":
call screen credits
"Return":
call screen main_menu
return

Here's the full traceback:

I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/script.rpy", line 5352, in script
call screen credits
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: bonus

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

Full traceback:
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\bootstrap.py", line 289, in bootstrap
renpy.main.main()
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\main.py", line 357, in main
run(restart)
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\main.py", line 77, in run
renpy.execution.run_context(True)
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\execution.py", line 598, in run_context
context.run()
File "game/script.rpy", line 5352, in script
call screen credits
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\ast.py", line 1635, in execute
self.call("execute")
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\ast.py", line 1653, in call
renpy.statements.call(method, parsed, *args, **kwargs)
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\statements.py", line 144, in call
return method(parsed, *args, **kwargs)
File "renpy/common/000statements.rpy", line 457, in execute_call_screen
store._return = renpy.call_screen(name, *args, **kwargs)
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\exports.py", line 2311, in call_screen
rv = renpy.ui.interact(mouse="screen", type="screen", roll_forward=roll_forward)
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\ui.py", line 247, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\display\core.py", line 2149, in interact
repeat, rv = self.interact_core(preloads=preloads, **kwargs)
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\display\core.py", line 2750, in interact_core
rv = root_widget.event(ev, x, y, 0)
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\display\layout.py", line 846, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\display\layout.py", line 846, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\display\layout.py", line 846, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\display\screen.py", line 626, in event
rv = self.child.event(ev, x, y, st)
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\display\layout.py", line 846, in event
rv = i.event(ev, x - xo, y - yo, cst)
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\display\behavior.py", line 762, in event
return handle_click(self.clicked)
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\display\behavior.py", line 705, in handle_click
rv = run(action)
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\display\behavior.py", line 274, in run
return var(*args, **kwargs)
File "renpy/common/00action_menu.rpy", line 128, in __call__
renpy.jump_out_of_context(self.label)
File "C:\Users\Opal\Downloads\renpy-6.18.3-sdk\renpy\exports.py", line 1416, in jump_out_of_context
raise renpy.game.JumpOutException(label)
JumpOutException: bonus

Windows-post2008Server-6.2.9200
Ren'Py 6.18.3.761
CircusofSoaringDreams 0.0

Thanks in advance! Hopefully I can fix this before the deadline tomorrow D:
Last edited by Celestial_Toast on Tue Jun 30, 2015 12:42 am, edited 1 time in total.
Check out my visual novels here: http://celestial-toast.itch.io/ Follow me on Twitter for game and story updates!

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Error: "JumpOutException"

#2 Post by PyTom »

The problem is you're not supposed to do "call screen main_menu". It doesn't actually return to the main menu context, just displays the screen. Try changing your code to read:

Code: Select all

label bonus:
    scene bg outsideMorning
    
    menu:
        "Gallery":
            call screen cg_gallery
        "Credits":
            call screen credits
        "Return":
            pass
    return
And you'll return to the main menu after the choice has finished.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Celestial_Toast
Regular
Posts: 70
Joined: Sun May 03, 2015 7:54 pm
Completed: Circus of Soaring Dreams, Rewind
Projects: Golden Hearts & Crimson Souls
Tumblr: celestialtoastgames
itch: celestial-toast
Contact:

Re: Error: "JumpOutException"

#3 Post by Celestial_Toast »

It's still giving me the same error. (Oh, and it's the return buttons on the Credits and Gallery pages giving me errors, the ones that link to the label bonus, not the return option in Bonus).

Also, now that I changed that, the return button on the bonus menu doesn't take me to the main menu, but instead to the beginning of the game. Strangely, it was working fine when I had it as "call main_menu"
Check out my visual novels here: http://celestial-toast.itch.io/ Follow me on Twitter for game and story updates!

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Error: "JumpOutException"

#4 Post by PyTom »

How are you calling bonus. I think it should be Start("bonus") and not Jump("bonus").
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Celestial_Toast
Regular
Posts: 70
Joined: Sun May 03, 2015 7:54 pm
Completed: Circus of Soaring Dreams, Rewind
Projects: Golden Hearts & Crimson Souls
Tumblr: celestialtoastgames
itch: celestial-toast
Contact:

Re: Error: "JumpOutException"

#5 Post by Celestial_Toast »

It is Start(bonus). Also, it works fine the first time I do it, but only the first.
Check out my visual novels here: http://celestial-toast.itch.io/ Follow me on Twitter for game and story updates!

philat
Eileen-Class Veteran
Posts: 1900
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Error: "JumpOutException"

#6 Post by philat »

Start() should be used when calling the bonus label from the main menu. From the gallery/credit screens, it should just be Return().

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Error: "JumpOutException"

#7 Post by PyTom »

Can you post all of the relevant code? The main menu, bonus menu, gallery and so on? It's really hard to support when we have to guess what's going on.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Celestial_Toast
Regular
Posts: 70
Joined: Sun May 03, 2015 7:54 pm
Completed: Circus of Soaring Dreams, Rewind
Projects: Golden Hearts & Crimson Souls
Tumblr: celestialtoastgames
itch: celestial-toast
Contact:

Re: Error: "JumpOutException"

#8 Post by Celestial_Toast »

I actually got around the problem by making bonus a screen instead of a label, and changing the code to match that. Now it works fine. Thanks for your help though! :)
Check out my visual novels here: http://celestial-toast.itch.io/ Follow me on Twitter for game and story updates!

Post Reply

Who is online

Users browsing this forum: haitai, Starberries