cgisca / PGSGP

Play Games Services plugin for Godot Game Engine - Android
MIT License
217 stars 61 forks source link

play_games_services.signIn() causes a crash #71

Closed ghost closed 2 years ago

ghost commented 2 years ago

I set everything up as it should. However, when I call a function, the application simply Crashes.

extends Node2D
var play_games_services

func _ready():
    if Engine.has_singleton("GodotPlayGamesServices"):
        $Label.text = "st: F"
        play_games_services = Engine.get_singleton("GodotPlayGamesServices")

        var show_popups := true
        var request_email := true
        var request_profile := true
        var request_token := "123123123123-xxxxxxxxxxxxxx.apps.googleusercontent.com"

        play_games_services.init(show_popups, request_email, request_profile, request_token)

        play_games_services.connect("_on_sign_in_success", self, "_on_sign_in_success") # account_id: String
        play_games_services.connect("_on_sign_in_failed", self, "_on_sign_in_failed") # error_code: int

    else:
        $Label.text = "st: KO"

func _on_sign_in_success(id_n):
    $Label.text = "S: " + str(id_n)

func _on_sign_in_failed(err_c):
    $Label.text = "E: " + str(err_c)

func _on_Button_pressed():
    $Label.text = "T."
    play_games_services.signIn()
    #crash