Renpy.input (length) not working.

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
yoni_
Newbie
Posts: 9
Joined: Thu May 18, 2017 11:24 pm
Deviantart: nadoChan
Contact:

Renpy.input (length) not working.

#1 Post by yoni_ »

hey, I wanted to make a screen where the player will pick their name. Everything worked except for the "length". This error keeps showing up.

Code: Select all

I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.


File "game/name_input.rpy", line 26: expected a keyword argument, colon, or end of line.
    input default "kyoko" pos(400,245) changed name_func length = 5
                                                                ^

Ren'Py Version: Ren'Py 6.99.11.1749
Here's the code for the name input:

Code: Select all

##for custom cursor caret
image my_caret:
    "caret.png"

    
    linear 1.0 alpha 1.0
    linear 1.0 alpha 0.0
    repeat

    

##screen for input
screen text_input_screen():
    default screenvar = False
    imagemap:
        ground "background.png"
        idle "idle.png"
        hover "hover.png"
        selected_idle "hover.png"

        hotspot (133, 211, 579, 182) action SetScreenVariable("screenvar",True)
        hotspot (619, 291, 83, 24) action [Hide("text_input_screen"),Jump("complete")]
        if screenvar == True:
            
            
            input default "kyoko" pos(400,245) changed name_func length = 5
            
    
The code in the script:

Code: Select all

init:
    default name = "Kyoko"
    
 

init python:
    def name_func(newstring):
        store.name = newstring
        
    
        
    style.input.caret = "my_caret"
    style.input.size = 35
    style.input.color = "#FFF"

        

define d = Character('')


# The game starts here.
label start:
    show screen text_input_screen
    d "This input box will only work when you click on it."
    d "Check the checkbox button when your done!."
    jump start
label complete:
    d "Your name is [name]!"
Pleaseeeee help ,,>M<,,

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Renpy.input (length) not working.

#2 Post by Divona »

Code: Select all

input default "kyoko" pos(400,245) changed name_func length 5
Completed:
Image

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]