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.
label start1:
if renpy.variant("web"):
jump passcheck
else:
jump start
label passcheck:
call screen password_input()
$ entered_password = _return
if entered_password == "Helix":
"Password Accepted."
jump start
else:
"Wrong password."
jump passcheck # Jump back to the start of the label, so they can try again.
I need this passcheck code to only work in the web version but it doesn't work for some reason
Show screen code.if you return pass with action add check that pass and jump there straight in that action
And There are some limitations https://www.renpy.org/doc/html/web.html
label start1:
if renpy.variant("web"):
jump passcheck
else:
jump start
label passcheck:
if entered_password == "Helix":
textbutton "submit":
action Notify("Password Accepted."), Jump("start")
else:
textbutton "submit":
action Notify ("wrong password, try again"), jump ("passcheck")
label start:
"The events and characters within this visual novel are completely fictitious and any resemblance to the real world is mere coincidence."
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/script.rpy", line 53: if statement expects a non-empty block.
if entered_password == "Helix":
^
File "game/script.rpy", line 54: end of line expected.
textbutton "submit":
^
File "game/script.rpy", line 57: expected statement.
else:
^
File "game/script.rpy", line 58: end of line expected.
textbutton "submit":
^
No in screen you have textbutonsubmit remove it and after value ScreenVariableInputValue("entered_password", returnable=True) use
if entered_password == "Helix":
textbutton "submit":
action Notify("Password Accepted."), Jump("start")
else:
textbutton "submit":
action Notify ("wrong password, try again"), jump ("passcheck")
After if and after else corect add some space before textbutton