renpy.input adding character name gives syntax error

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
Posts: 4
Joined: Fri Jun 15, 2018 7:02 pm

renpy.input adding character name gives syntax error

#1 Post by Fire247 » Sat Jun 16, 2018 9:40 am

I am having a small problem with renpy.input. When I write a narrator line between the brackets it works just fine but when I write a dialog line it gives me a syntax error. Is it possible to input something while a character is asking a question or saying something? I know I could write the question in a separate line and then give the player an input box, but that wouldn't look very "clean".

Here's the code:

Code: Select all

$ inputzahl = renpy.input(character "Was ist [a] + [b]?").strip()
#gives me a syntax error
$ inputzahl = renpy.input("Was ist [a] + [b]?").strip()
#works fine but doesn't display character name while input

User avatar
Posts: 439
Joined: Mon Jan 26, 2009 7:21 pm

Re: renpy.input adding character name gives syntax error

#2 Post by gas » Sat Jun 16, 2018 9:50 am

Input get a string as a prompt, not a speaker line.
That's a limit you can't bypass. You can try to cheat the system by showing that name directly (with a fake name box if needed).
10 ? "RENPY"
20 GOTO 10


Post Reply

Who is online

Users browsing this forum: No registered users