Error: "Required integer?"

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
Message
Author
carosene

Error: "Required integer?"

#1 Post by carosene »

Traceback:

Code: Select all

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
Line:

Code: Select all

    "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...

Kikered
Regular
Posts: 128
Joined: Sat Feb 26, 2005 3:02 pm
Completed: Quine, The Secret Ingredient
Projects: Metropolitan Blues, Mirai Imouto, Temple Glen, Fuyu no Tabi, MIA
Organization: Team BG
Location: The Midwest
Contact:

Re: Error: "Required integer?"

#2 Post by Kikered »

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:

Code: Select all

"After all, 80%% of the Reato tourist industry is made up of Americans. Think of how much that would hurt their economy."
To answer your other question:
Just curious, is editing like this 90% trying to find silly little errors that have made your program unhappy...?
That's generally a large part of what programming is. ;)
Verbosity leads to unclear, inarticulate things.

carosene

Re: Error: "Required integer?"

#3 Post by carosene »

Thanks so much! ^-^;; I'll have to try to get used to it then.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], barsunduk