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.
-
TigerAlpaca
- Regular
- Posts: 38
- Joined: Tue Apr 03, 2018 4:19 am
-
Contact:
#1
Post
by TigerAlpaca » Sun Aug 12, 2018 6:08 am
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 1043: expected statement.
renpy.full_restart(transition=False, label='_invoke_main_menu', target='_main_menu'):
^
Ren'Py Version: Ren'Py 7.0.0.196
Sun Aug 12 11:07:11 2018
This is the code it occurs in (it comes right after a jumpscare) -
Code: Select all
text "Bad ending"
text "Maybe you should try agian."
renpy.full_restart(transition=False, label='_invoke_main_menu', target='_main_menu')
label falsepath4:
"I kissed him back as I wrapped my arms around him."
-
MaydohMaydoh
- Regular
- Posts: 165
- Joined: Mon Jul 09, 2018 5:49 am
- Projects: Fuwa Fuwa Panic
- Tumblr: maydohmaydoh
- Location: The Satellite of Love
-
Contact:
#2
Post
by MaydohMaydoh » Sun Aug 12, 2018 9:28 am
renpy.full_restart is a python statement so you need to put the $ in front of it
Code: Select all
$ renpy.full_restart(transition=False, label='_invoke_main_menu', target='_main_menu')
-
Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
-
Contact:
#3
Post
by Imperf3kt » Sun Aug 12, 2018 5:25 pm
renpy.full_restart will take a player back to the main menu, but why aren't you just using a return?
Also, labels should be indented all the way left, with no spaces.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project:
GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
-
TigerAlpaca
- Regular
- Posts: 38
- Joined: Tue Apr 03, 2018 4:19 am
-
Contact:
#4
Post
by TigerAlpaca » Mon Aug 13, 2018 7:08 am
Thanks for the help- I'm using restart as I want to give the jumpscares a more kind of spooky feel to them.
-
Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
-
Contact:
#5
Post
by Imperf3kt » Mon Aug 13, 2018 6:52 pm
Yes, I can see what you're trying to achieve, and a return will do exactly the same thing.
There's no harm in using it, but that full restart function is meant for other uses, like fully restarting Ren'py, without needing to close and relaunch the game, resetting any game state and returning a player to the very top of the call stack.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project:
GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Users browsing this forum: Google [Bot], Ocelot