- Edited
I've been following along with CoffeeCrow's "how to create menus in godot" playlist:
and got to the video about saving and loading keybinds.
I've followed along and set up the hotkey saving and loading function and it does write a save file. However when I try to start my game it crashes on trying to load the save file. I'm getting the error: "Invalid access to property or key 'Going_Left' on a base object of type 'Dictionary'. I took a screenshot of where it's happening in the code as well as including the Stack Frames if that helps!
Also here is the debug print for the loaded_data
{ "keybinds": { "Fast": "InputEventKey: keycode=87 (W), mods=none, physical=true, location=unspecified, pressed=false, echo=false", "Going Left": "InputEventKey: keycode=65 (A), mods=none, physical=true, location=unspecified, pressed=false, echo=false", "Going Right": "InputEventKey: keycode=68 (D), mods=none, physical=true, location=unspecified, pressed=false, echo=false", "Skip Dialog": "InputEventKey: keycode=32 (Space), mods=none, physical=true, location=unspecified, pressed=false, echo=false", "Slow": "InputEventKey: keycode=83 (S), mods=none, physical=true, location=unspecified, pressed=false, echo=false", "Walk Down": "InputEventKey: keycode=83 (S), mods=none, physical=true, location=unspecified, pressed=false, echo=false", "Walk Left": "InputEventKey: keycode=65 (A), mods=none, physical=true, location=unspecified, pressed=false, echo=false", "Walk Right": "InputEventKey: keycode=68 (D), mods=none, physical=true, location=unspecified, pressed=false, echo=false", "Walk Up": "InputEventKey: keycode=87 (W), mods=none, physical=true, location=unspecified, pressed=false, echo=false" }, "master_volume": 0.31, "music_volume": 0.31, "resolution_mode_index": 0, "sfx_volume": 0.259, "voice_volume": 0.283, "window_mode_index": 0 }
At: res://Autoloads/SaveManager.gd:33:load_settings_data()