TypeError 'int' object is not callable [SOLVED]

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
User avatar
Luxliev
Veteran
Posts: 242
Joined: Sat Feb 07, 2015 11:01 am
Soundcloud: Luxliev
Contact:

TypeError 'int' object is not callable [SOLVED]

#1 Post by Luxliev »

I keep getting error mentioned in topic name. I wanted to merge two different projects (when they are separated I don't get any errors).

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/research data.rpy", line 2, in script
    $fusion_bomb = research("Fusion Bomb", 55, "Fusion Bomb technology description", unlocked=True) ##delete
  File "game/research data.rpy", line 2, in <module>
    $fusion_bomb = research("Fusion Bomb", 55, "Fusion Bomb technology description", unlocked=True) ##delete
TypeError: 'int' object is not callable

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/research data.rpy", line 2, in script
    $fusion_bomb = research("Fusion Bomb", 55, "Fusion Bomb technology description", unlocked=True) ##delete
  File "D:\Downloads\renpy-6.18.3-sdk\renpy\ast.py", line 785, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "D:\Downloads\renpy-6.18.3-sdk\renpy\python.py", line 1382, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/research data.rpy", line 2, in <module>
    $fusion_bomb = research("Fusion Bomb", 55, "Fusion Bomb technology description", unlocked=True) ##delete
TypeError: 'int' object is not callable

Windows-post2008Server-6.2.9200
Ren'Py 6.18.3.761
This is the code that causes problem:

Code: Select all

label start:
    jump research_data
Check Script (lint) also doesn't show any errors.

Code: Select all

Ren'Py 6.18.3.761 lint report, generated at: Mon Mar 23 20:20:59 2015


Statistics:

The game contains 723 dialogue blocks, containing 11,273 words and 73,274
characters, for an average of 15.6 words and 101 characters per block.

The game contains 4 menus, 50 images, and 15 screens.


Remember to set config.developer to False before releasing.

Lint is not a substitute for thorough testing. Remember to update Ren'Py
before releasing. New releases fix bugs and improve compatibility.
Last edited by Luxliev on Mon Mar 23, 2015 4:05 pm, edited 1 time in total.
Newest classical cover: Advance Wars - Sami Theme: https://www.youtube.com/watch?v=657Jt7hJRVc

Forum with my music: http://luxliev.proboards.com/

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: TypeError 'int' object is not callable

#2 Post by PyTom »

I suspect that what's going on is that in one codebase, research is an integer valued variable, while in the other, it's a function. That would cause this problem - you'll need to rename one or the other to fix this.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Luxliev
Veteran
Posts: 242
Joined: Sat Feb 07, 2015 11:01 am
Soundcloud: Luxliev
Contact:

Re: TypeError 'int' object is not callable

#3 Post by Luxliev »

It was exactly as you said. There was one variable $ research and class research. Thanks for help! Solved.
Newest classical cover: Advance Wars - Sami Theme: https://www.youtube.com/watch?v=657Jt7hJRVc

Forum with my music: http://luxliev.proboards.com/

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot]