Hi. I'm trying to configure leaderboards and achievements with this library, and everything seems to go right until I try to submit a score to one of the leaderboards that I have configured in my Google Play Games console. After trying to make it work on my app, without success, I've been trying the Informatix demo as he wrote in post #168, and the result is the same. The app connects, and can retrieve the list of leaderboards and achievements, but when I try to submit a score to one of the leaderboards the Sub GP_onScoreSubmitted shows the error "SubmitScoreImmediate: Error=2" in a MsgBox.
Code:
If StatusCode <> Leaderboards.STATUS_OK Then
'The score submission failed
Msgbox("SubmitScoreImmediate: Error=" & StatusCode, "Error")
Return
End If
...and the score is not submitted. I've been looking for the value StatusCode = 2 and seems to correspond to "CLIENT_RECONNECT_REQUIRED", but just before the code in which I try submit a score everything seems to be right (all the next logs are 'True', and the first is "Signed In"):
Code:
'...
Log("Connection.GPC.ConnectionStateStr : " & Connection.GPC.ConnectionStateStr)
Log("Connection.IsSignedIn : " & Connection.IsSignedIn)
Log("Connection.GPC.IsConnected : " & Connection.GPC.IsConnected)
Log("Connection.GPC.IsSignedIn : " & Connection.GPC.IsSignedIn)
Log("Connection.GPC.IsInitialized : " & Connection.GPC.IsInitialized)
Log("Connection.NI.IsConnected : " & Connection.NI.IsConnected)
Log("Connection.NI.IsInitialized : " & Connection.NI.IsInitialized)
Leaderboards.SubmitScoreImmediate("CgkI766JsIEFEAIQHg", Rnd(10, 10000)).SetResultEvent("GP_onScoreSubmitted")
It's curious, but when trying to increment one achievement the Sub GP_onAchievementIncremented throws the same error as when trying to submit a score (StatusCode = 2), but the achievement is registered!
With "GPUtils.AppId" I get the same AppId as the indicated in the Google Play Games console, and the same that appears on the games-ids.xml file, the games-ids.xml file is on its place, the SHA1 key matches, the lines indicated in post #1 of this thread are added to the manifest file, as well as "#AdditionalJar: com.google.android.gms: play-services-games", ...
Don't know if it is important for this issue, but in the Sub Connection.Autoconnect (ClsConnection module) I can't connect using "GPC.Connect(False)". I have to set to "True" the FirstAttempt parameter, or connect using GPC.Reconnect:
Code:
If Not(GPC.IsSignedIn) Then
GPC.Connect(True)
' GPC.Reconnect
End If
Any ideas?
Thank you in advance.