Page 1 of 1

show img at right typeerror: 'int' object not callable

Posted: Thu Nov 21, 2013 3:45 pm
by chris3spice
This is a new error for me to run into, these are the lines of code causing the issue, if I change it to at left instead of right it works perfectly fine...

Code: Select all

scene black
show pb norm at right
with dissolve
This is the error I get

Code: Select all

An exception has occurred.
While running game code:
File "game/intro.rpy", line 48, in script
TypeError: 'int' object is not callable

Full traceback:
File "C:\Users\Chris\Desktop\RenPy\renpy\execution.py", line 288, in run node.execute()
File "C:\Users\Chris\Desktop\RenPy\renpy\ast.py", line 965, in execute show_imspec(self.imspec, atl=getattr(self, "atl", None))
File "C:\Users\Chris\Desktop\RenPy\renpy\ast.py", line 939, in show_imspec atl=atl)
File "C:\Users\Chris\Desktop\RenPy\renpy\exports.py", line 338, in show img=i(img)
TypeError: 'int' object is not callable

Windows-post2008Server-6.2.9200
Ren'Py 6.16.1.409
A Ren'Py Game 0.0

Re: show img at right typeerror: 'int' object not callable

Posted: Thu Nov 21, 2013 5:54 pm
by Donmai
Looks like a problem with variable naming. For example, IIRC 'norm' is an internal Python function. You should not try to define it as a name in your script.

Re: show img at right typeerror: 'int' object not callable

Posted: Thu Nov 21, 2013 7:19 pm
by chris3spice
Donmai wrote:Looks like a problem with variable naming. For example, IIRC 'norm' is an internal Python function. You should not try to define it as a name in your script.
I renamed it to four different things... pb_normal, pb_standard, pb_stand, pb_happy... it works everywhere except when I use the "at right" function

EDIT: I created a entire new VN and it works perfectly fine in there...but for some reason I can not get any image to use the "at right" function in my current game.

Re: show img at right typeerror: 'int' object not callable

Posted: Thu Nov 21, 2013 7:39 pm
by Megaman Z
chris3spice wrote:
Donmai wrote:Looks like a problem with variable naming. For example, IIRC 'norm' is an internal Python function. You should not try to define it as a name in your script.
I renamed it to four different things... pb_normal, pb_standard, pb_stand, pb_happy... it works everywhere except when I use the "at right" function

EDIT: I created a entire new VN and it works perfectly fine in there...but for some reason I can not get any image to use the "at right" function in my current game.
Gut feeling: You created some variable named "right" which overrides the default right position. look through your code, particularly in any init blocks.

Re: show img at right typeerror: 'int' object not callable

Posted: Thu Nov 21, 2013 7:59 pm
by chris3spice
Megaman Z wrote:
chris3spice wrote:
Donmai wrote:Looks like a problem with variable naming. For example, IIRC 'norm' is an internal Python function. You should not try to define it as a name in your script.
I renamed it to four different things... pb_normal, pb_standard, pb_stand, pb_happy... it works everywhere except when I use the "at right" function

EDIT: I created a entire new VN and it works perfectly fine in there...but for some reason I can not get any image to use the "at right" function in my current game.
Gut feeling: You created some variable named "right" which overrides the default right position. look through your code, particularly in any init blocks.
That was it, I went through my variables and I missed an underscore where I wanted one! Thank You!

Re: show img at right typeerror: 'int' object not callable

Posted: Fri Nov 22, 2013 11:54 am
by xavimat
As a reference, the list of reserved names in Ren'Py. Better not to use them as our variable names:
http://www.renpy.org/doc/html/reserved.html