Hello there,
I have a splashscreen which ends with the return statement which gets you to the menu. In my ending label is some text which appears and disappears. At the end is also a return statement. This worked days ago. I worked on some other things for awhile, I do not know when it stopped working, but now instead of getting to the menu, you jump to a random label. With that I mean that it jumped to a certain label every time I tried and after ignoring the issue for a while and working on other things it started to jump to a different label instead. I read about the return statement and it says that it pops the last thing from the call stack. If it is empty it gets you to the menu. How do I clear this call stack?
Thank you for your time
How to end the game? Return statement & call stack [Solved]
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.
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.
-
- Newbie
- Posts: 22
- Joined: Thu Apr 22, 2021 8:57 am
- Contact:
How to end the game? Return statement & call stack [Solved]
Last edited by kafkaontheshore on Sat May 08, 2021 8:52 am, edited 1 time in total.
- Ocelot
- Lemma-Class Veteran
- Posts: 2446
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: How to end the game? Return statement & call stack
You structure your code properly and match amount of calls with amount of returns. While you are doing that, you can use quick hack, which does the same as "Return to main menu" option in pause menu:
renpy.full_restart(config.game_main_transition)
renpy.full_restart(config.game_main_transition)
< < insert Rick Cook quote here > >
-
- Newbie
- Posts: 22
- Joined: Thu Apr 22, 2021 8:57 am
- Contact:
Re: How to end the game? Return statement & call stack
Thank you so much! I will do that!
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]