[SOLVED]Need help for name choice

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
Houseofmine
Newbie
Posts: 2
Joined: Sun Apr 28, 2024 1:32 pm
Contact:

[SOLVED]Need help for name choice

#1 Post by Houseofmine »

Can someone help me with this code ? For some reason no matter what I write as a name, if it's not "TheFrenchyDude", it just says "very funny" and sends me back to the name choice (even if it's not one of the slurs in the list) and there is no way to continue :

Code: Select all

label choice_name:

        $ Name = renpy.input("What is your name?", length=15)
        $ Name = Name.strip()

        if Name == "TheFrenchyDude":
            "Hey, that's me ?!?"
            jump choice_name
        if Name == "bitch", "slut", "shit", "fuck", "fucker", "cunt":
            a "very funny"
            jump choice_name
        else:
            "Yay"
            jump chapter1
Last edited by Houseofmine on Mon Apr 29, 2024 8:07 am, edited 1 time in total.

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

Re: Need help for name choice

#2 Post by philat »

Use either of the following if checks:

Code: Select all

if Name == "A" or Name == "B" or ... :

if Name in ["A", "B" ... ]:

Houseofmine
Newbie
Posts: 2
Joined: Sun Apr 28, 2024 1:32 pm
Contact:

Re: Need help for name choice

#3 Post by Houseofmine »

philat wrote: Mon Apr 29, 2024 12:39 am Use either of the following if checks:

Code: Select all

if Name == "A" or Name == "B" or ... :

if Name in ["A", "B" ... ]:
It works ! Thank you !

Post Reply

Who is online

Users browsing this forum: No registered users