You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello there, I am having issues with some of the code in Godot 4. This has to do with Save Games. Sadly I don't really understand the issue or what is going on, but I will provide context and hopefully, it can be solved.
I am receiving the following error: USER ERROR: Error calling from signal '_on_game_load_fail' to callable: 'Node2D(main.gd)::_on_game_load_fail': Method expected 1 arguments, but called with 0.
This occurs for _on_game_saved_fail too
For context, I am making the following connections as such (for Godot 4 compatibility)
On the JSON side of things, I am using the methods directly from the JSON object. Specifically, the stringify() and parse_string(). Example: fromvar available_events = parse_json(events_array)tovar available_events = JSON.parse_string(events_array)
and fromplay_games_services.saveSnapshot("SNAPSHOT_NAME", to_json(data_to_save), "DESCRIPTION")toplay_games_services.saveSnapshot("SNAPSHOT_NAME", JSON.stringify(game_save_data), "This is a test")
The other code works using this implementation, it is just the snapshots part that is causing issues. Furthermore, if I try to show, save, or load snapshots only then do the other parts of the code present the same error message for their respective signals for some reason.
Hopefully we can find solutions to this, I will update this thread if I find one.
The text was updated successfully, but these errors were encountered:
The problem fixed itself (?). I am investigating. The difference was that I ran the game through Google Play Games app. Maybe it has something to do with that?
Hello there, I am having issues with some of the code in Godot 4. This has to do with Save Games. Sadly I don't really understand the issue or what is going on, but I will provide context and hopefully, it can be solved.
I am receiving the following error:
USER ERROR: Error calling from signal '_on_game_load_fail' to callable: 'Node2D(main.gd)::_on_game_load_fail': Method expected 1 arguments, but called with 0.
This occurs for
_on_game_saved_fail
tooFor context, I am making the following connections as such (for Godot 4 compatibility)
On the JSON side of things, I am using the methods directly from the
JSON
object. Specifically, thestringify()
andparse_string()
. Example:from
var available_events = parse_json(events_array)
tovar available_events = JSON.parse_string(events_array)
and
from
play_games_services.saveSnapshot("SNAPSHOT_NAME", to_json(data_to_save), "DESCRIPTION")
toplay_games_services.saveSnapshot("SNAPSHOT_NAME", JSON.stringify(game_save_data), "This is a test")
The other code works using this implementation, it is just the snapshots part that is causing issues. Furthermore, if I try to show, save, or load snapshots only then do the other parts of the code present the same error message for their respective signals for some reason.
Hopefully we can find solutions to this, I will update this thread if I find one.
The text was updated successfully, but these errors were encountered: