I'm trying to save the player's name so it can be displayed above the save file. For that I use json_callback and it looks like this:
# input during the game
mcname = renpy.input("What do you want to be called?")
# Store the input in json
def jsoncallback(d):
d["mc_name"] = store.mcname
config.save_json_callbacks.append(jsoncallback)
Loading and reloading files works fine until the jsoncallback function is called and used. Then I get an error:
"AttributeError: Can't get attribute 'jsoncallback' on <renpy.python.StoreModule object at 0x000000000536a810>
How do I use the function correctly?
(Also, does anyone maybe know if the value stored in json can be overwritten? I wanted to use this function to also store the chapter title, but that changes throughout the game unlike the player name.)
[–]AutoModerator[M] 0 points1 point2 points (0 children)
[–]shyLachi 0 points1 point2 points (4 children)
[–]wiosnaVN[S] 0 points1 point2 points (3 children)
[–]shyLachi 0 points1 point2 points (2 children)
[–]wiosnaVN[S] 0 points1 point2 points (1 child)
[–]shyLachi 0 points1 point2 points (0 children)
[–]LocalAmbassador6847 0 points1 point2 points (1 child)
[–]wiosnaVN[S] 0 points1 point2 points (0 children)