Hello,
I use the following lines to test the differences between gpgs and gpgs.v2:
gpgs = require( "plugin.gpgs" ) -- or gpgs = require( "plugin.gpgs.v2" ) local function loadLocalPlayerCallback(e) end function loginCallbackGpgs(event) gpgs.players.load({listener = loadLocalPlayerCallback}) end gpgs.login({userInitiated = true, listener = loginCallbackGpgs}) -- some time later: local function submitScore() if gpgs.isConnected() then print ("connected") gpgs.leaderboards.submit({leaderboardId = "xyz", score = 123}) end end
While this works in flight mode on Android with gpgs, it throws out an error when using gpgs.v2 when calling submitScore:
java.lang.NullPointerException: Attempt to invoke virtual method ‘android.content.Context android.content.ContextWrapper.getApplicationContext()’ on a null object reference
Shouldn’t gpgs.v2 be backwards compatible?
Build Version 2018.3428