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.
TypeError: an integer is required
While running game code:
- script at line 28 of F:\Visual Novels\renpy-6.6.2\Mafia Twins/game/script.rpy
-- Full Traceback ------------------------------------------------------------
File "F:\Visual Novels\renpy-6.6.2\renpy\bootstrap.py", line 210, in bootstrap
File "F:\Visual Novels\renpy-6.6.2\renpy\main.py", line 303, in main
File "F:\Visual Novels\renpy-6.6.2\renpy\main.py", line 92, in run
File "F:\Visual Novels\renpy-6.6.2\renpy\execution.py", line 199, in run
File "F:\Visual Novels\renpy-6.6.2\renpy\ast.py", line 343, in execute
File "F:\Visual Novels\renpy-6.6.2\renpy\exports.py", line 461, in say
TypeError: an integer is required
"After all, 80% of the Reato tourist industry is made up of Americans. Think of how much that would hurt their economy."
Just curious, is editing like this 90% trying to find silly little errors that have made your program unhappy...? I mean, I just spent half an hour replacing quotation marks I just copied from word that it hated... which it was fine with on another script I made...
The percent sign is what's throwing it off. Since RenPy uses them as 'indicators' to insert variables into the text (i.e. %(variable_name)s ), it's expecting something in that format.
To display a percent sign normally, you'll need to double it up: