RenPy: incl. variable in narrator's line

I'm creating a visual novel in RenPy and want to include a variable inside a narrator's line. I've tried several python scripts (see below) already, but i keep getting an invalid syntax error. Anyone knows why?

e "Heel goed %s" %(participant_name)  "Op naar de volgende vraag."
e "Heel goed {kwarg}".format(kwarg=participant_name)  "Op naar de volgende vraag."
e "Heel goed" + str(participant_name) +  "Op naar de volgende vraag."

Upvotes: 1

Views: 288

Answers (1)

mcmartelle
mcmartelle

Reputation: 11

To insert a python variable into a Renpy string use square brackets []

e "Heel goed [participant_name] Op naar de volgende vraag."

Upvotes: 1

Related Questions