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.
$ name = renpy.input("Before you can start, let's hear your name.", length=10)
$ name = name.strip()
menu name:
"Did I hear that right, [name]?"
"Yes":
jump nameok
"No":
jump start
It lets you write as many letters as you want, going offscreen...
xavimat wrote: ↑Fri Jan 15, 2021 6:10 pm
I can't see any error in the input line. It should work.
Are you sure you have restarted your game after adding the "length" parameter?
On a side note, try to avoid using the same name for different things. You have "name" as a string and also as the name of the menu.
I rebooted the game multiple times and it didn't change the outcome :/
xavimat wrote: ↑Fri Jan 15, 2021 6:10 pm
I can't see any error in the input line. It should work.
Are you sure you have restarted your game after adding the "length" parameter?
On a side note, try to avoid using the same name for different things. You have "name" as a string and also as the name of the menu.
I rebooted the game multiple times and it didn't change the outcome :/
$ name = renpy.input("Before you can start, let's hear your name.", length=10)
$ name = name.strip()
menu:
"Did I hear that right, [name]?"
"Yes":
jump nameok
"No":
jump start
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Ok I'm back, and I think I figured something out:
When I add a blinking caret to the input screen (I don't automatically have it for some reason?), that's when the length argument stops working. When I get rid of the caret, the input only lets you type in 10 characters. What's the reason to this?
Turns out, since I only need one input in the whole game, I decided to add "input length 10" into the input screen itself instead of the one particular menu. Playing around with the order of these eventually got me to successfully get everything working as it should. There was a little bug where if I put "input caret blink" before "input length 10", the input text would go on a separate line from the caret...
Anyhow, it's all working now!