[SOLVED] Renpy.input asks for input twice?

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
User avatar
sapiboonggames
Veteran
Posts: 299
Joined: Thu Jan 05, 2012 8:53 am
Completed: I Love You, Brother [BxB]
Contact:

[SOLVED] Renpy.input asks for input twice?

#1 Post by sapiboonggames »

Hi guys, I'm back with yet another question.
This time, it's a rather weird thing...

I use the renpy.input to let the players input their own names.

Code: Select all

label inputname:
    $ name = renpy.input("Please input your name (Maximum number of character is 11)", length=11)
    if name == "":
        $ name = "Danshi"
    return
The weird thing is, when I input some characters and press ENTER, the characters that I've inputted went missing and I have to input the characters again. This time, if I press ENTER, the engine accepts the name input.

This is my input scene script:
(However, I have tested plugging in the default input scene and the same problem persists.)

Code: Select all

##############################################################################
# Input
#
# Screen that's used to display renpy.input()
# http://www.renpy.org/doc/html/screen_special.html#input
screen input(prompt):
    add "pref/inputbackground.png"
    text prompt xalign 0.5 ypos 180 font "Roboto-Regular.ttf" size 28 xoffset -20
    input id "input" xpos 417 ypos 305 size 48 color "#4c352f"
    imagebutton:
        xpos 468
        ypos 386
        idle "pref/confirmidle.png"
        hover "pref/confirmhover.png"
        action GetText("input","input")
    use quick_menu
I honestly have no idea where the problem lies.
Aside from several custom scenes, I'm also using the Basic Message Script & Text History system in the cookbook.
I also use the DSE framework without the day planner.

I'd be really grateful if someone can enlighten me :)
Last edited by sapiboonggames on Sun Sep 06, 2015 11:22 am, edited 1 time in total.
Visit my website: http://www.sapiboong.com

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Renpy.input asks for input twice?

#2 Post by PyTom »

How are you calling input name? Could the code be falling through to that label?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
sapiboonggames
Veteran
Posts: 299
Joined: Thu Jan 05, 2012 8:53 am
Completed: I Love You, Brother [BxB]
Contact:

Re: Renpy.input asks for input twice?

#3 Post by sapiboonggames »

That's it! It's such a silly mistake.
Thank you once again!
Visit my website: http://www.sapiboong.com

Post Reply

Who is online

Users browsing this forum: voluorem