Morhighan wrote:
Anyway, I removed the imagemap only to discover that the save function still didn't work, with or without. I can't enter the "right click" menu jump, and that is the problem, I think.
The error message you're getting:
Morhighan wrote:
Code: Select all
TypeError: 'str' object is not callable
suggests that Ren'Py is trying to call a function, but the thing it thinks is a function isn't a function, it's a string.
Here is an example of one way that can happen, from the interactive Python prompt:
Code: Select all
>>> abs(-5)
5
>>> abs = "some string"
>>> abs
'some string'
>>> abs(-5)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: 'str' object is not callable
Normally, 'abs' is a function which returns the absolute value of a number. However, if you don't know this and you create a variable called 'abs' in your game, you'll overwrite the function, meaning that if any code anywhere else in your game tries to use the 'abs' function, it'll actually try and call the variable you created, which won't work.
Another way you can do it is to pass a string variable to some part of Ren'Py which isn't expecting a string:
Code: Select all
$ myString = "some text"
show mySprite at myString
- this doesn't work and gives the same error.
Similar problems have been reported before, and the ones which have been solved have had the same cause: someone's overwriting a pre-defined Python name for one of their variables, giving variables names like "str".
There's no really easy way to find a big list of all the names you should avoid, and IMO it's one of the very annoying things about Python, that it doesn't warn you when you accidentally overwrite a function or whatever, but it's a working-as-designed problem. If you post the full traceback you're getting then it might be possible to track down the name you've likely overwritten in this case, but as a general rule, give your variables longer, more-descriptive names (it's a good idea anyway!) and you're less likely to overwrite Python pre-defined items.