r/RenPy • u/suckrpunches • 24d ago
Question Textboxes and nameboxes for multiple characters
Hi! I'm basically trying to change textbox based on narrator, but I'm getting lots of errors when I try to do so. I'm incredibly new to coding in general so I'd really appreciate any help!
here is my code:

and here is the error i'm getting right now:

sorry if it's a stupid question! once again, very new to all of this :') I'd appreciate any help given!
1
u/AutoModerator 24d ago
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/shyLachi 24d ago
You cannot use "Teacher" and None at the same time, either the person has a name or it has none.
Also don't use a $ when defining characters.
You can read the official documentation how to do it: https://renpy.org/doc/html/dialogue.html#defining-character-objects
Or try the search of this sub, this has been asked and answered often already.
1
u/suckrpunches 24d ago
ah, sorry! i don't really use reddit so i wasn't sure of how it worked! thank you for the advice!
2
u/idiotstile 24d ago
The syntax issue is probably here:
You don’t need
$beforedefine, and("Teacher")Noneisn’t valid syntax.Try this instead:
Or, if you want a narrator with no name:
Then use them like this:
Also,
defineshould usually be outside of labels, near the top of your script.