'int' object not callable 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.
Message
Author
neowired
Regular
Posts: 199
Joined: Mon Dec 01, 2008 2:33 pm
Contact:

Re: 'int' object not callable error

#16 Post by neowired »

File "game/script.rpy", line 18, in samantha
samantha_enemy(what, **kwargs)
TypeError: 'int' object is not callable
the way this error is phrased probably means that somewhere in your code you defined/redefined the variable "samantha_enemy" or the variable "what" as an int/number value
My guess would be that somewhere in the code some variables got mixed.

I also recall having some bug with the character statement in the newest version of renpy, when the Character has a name
try doing samantha_enemy = Character(None,
and see if that still bugs out
It's probably not it, but that's the only other thing I could think of

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: 'int' object not callable error

#17 Post by namastaii »

The reason I made it so it goes into the negative is because once they lose all their relationships points with a character, I like that it starts a new bar. It starts from the beginning and goes up just like normal but with negative points. Like it's going backward, if that makes sense. I have a code for this that works really well and is coded to color and all that. Then I add the ctc changer and it works except for when ...it goes into the negative and there's nothing I can do about it apparently. lol Gah

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: 'int' object not callable error

#18 Post by namastaii »

neowired wrote:
File "game/script.rpy", line 18, in samantha
samantha_enemy(what, **kwargs)
TypeError: 'int' object is not callable
the way this error is phrased probably means that somewhere in your code you defined/redefined the variable "samantha_enemy" or the variable "what" as an int/number value
My guess would be that somewhere in the code some variables got mixed.

I also recall having some bug with the character statement in the newest version of renpy, when the Character has a name
try doing samantha_enemy = Character(None,
and see if that still bugs out
It's probably not it, but that's the only other thing I could think of
I did look through and see if I did something weird but I didn't find anything wrong. And it's plain as day for the samantha_enemy. It's just next to the other ones:

Code: Select all

define samantha_neutral = Character('Samantha',color="#ff6699", ctc="ctc_animation", show_side_image=DynamicDisplayable(draw_samantha_side))
define samantha_enemy = Character('Samantha',color="#ff6699", ctc="skull_animation", show_side_image=DynamicDisplayable(draw_samantha_side))
define samantha_lover = Character('Samantha',color="#ff6699", ctc="heart_animation", show_side_image=DynamicDisplayable(draw_samantha_side))
It DOES work as long as the if/else is within positive numbers. If I tell it to have the enemy icon for when points are above 0 it does change it. So it's just frustrating it won't work with the negative values.

Post Reply

Who is online

Users browsing this forum: No registered users