Code: Select all
init python:
def FinishEnterName():
if not player: return
persistent.playername = player
renpy.hide_screen("name_input")
renpy.jump_out_of_context("start")
screen navigation():
vbox:
style_prefix "navigation"
xpos gui.navigation_xpos
yalign 0.8
spacing gui.navigation_spacing
if not persistent.autoload or not main_menu:
if main_menu:
if persistent.playthrough == 1:
textbutton _("Continue") action If(persistent.playername, true=Start(), false=Show(screen="name_input", message="Please enter your name", ok_action=Function(FinishEnterName)))
else:
textbutton _("New Game") action If(persistent.playername, true=Start(), false=Show(screen="name_input", message="Please enter your name", ok_action=Function(FinishEnterName)))
else:
When trying to execute the code by pressing "New Game", instead I'm given this error:
Code: Select all
"While running game code:
File "renpy/common/00action_control.rpy" , line 126, in__call__
renpy.show_screen(self.screen, *self.args, **self.kwargs)
Exception: Screen name_input is not known."
The "Load Game" Execution works just fine, prompting with save files to use.
I have a feeling it may have something to do with "%(pn)s" and "persistent.playername = player" from the beginning of the code in screen. Any ideas?