Sunday, July 7, 2024

Python Error (Renpy) : TypeError: 'str' object is not callable

Met an error in renpy when writing the action function of an image button like below :
 action Function( '\u2192', pygame.K_RIGHT)

Error shown as below : 
File "renpy/common/00action_other.rpy", line 583, in __call__

    rv = self.callable(*self.args, **self.kwargs)

TypeError: 'str' object is not callable

Forgot to add the function name 
Corrected the syntax to below (also added the parameter name to before value):
action Function(simulate_keypress, unicode_key='\u2192', pygame_key=pygame.K_RIGHT)


No comments:

Post a Comment

Next year SF migration plan : moving out customer account to AWS , and call SF data with service account

 πŸ‘€ The most challenging part is about those function with user verification. My service cloud with MIAW chat , nearly redo due to the user ...