Hello! I totally lost and don’t know how to deal with this: game center just don’t post scores in any Leaderboard!
I set everything right in iTunes connect
Here is the code:
in main.lua
local gameNetwork = require( "gameNetwork" ) local playerName local function loadLocalPlayerCallback( event ) playerName = event.data.alias --saveSettings() --save player data locally using your own "saveSettings()" function end local function gameNetworkLoginCallback( event ) gameNetwork.request( "loadLocalPlayer", { listener=loadLocalPlayerCallback } ) return true end local function gpgsInitCallback( event ) gameNetwork.request( "login", { userInitiated=true, listener=gameNetworkLoginCallback } ) end local function gameNetworkSetup() if ( system.getInfo("platformName") == "Android" ) then gameNetwork.init( "google", gpgsInitCallback ) else gameNetwork.init( "gamecenter", gameNetworkLoginCallback ) end end ------HANDLE SYSTEM EVENTS------ local function systemEvents( event ) print("systemEvent " .. event.type) if ( event.type == "applicationSuspend" ) then print( "suspending..........................." ) elseif ( event.type == "applicationResume" ) then print( "resuming............................." ) elseif ( event.type == "applicationExit" ) then print( "exiting.............................." ) elseif ( event.type == "applicationStart" ) then gameNetworkSetup() --login to the network here end return true end Runtime:addEventListener( "system", systemEvents )
then in my setScore.lua
local function postScoreSubmit( event ) print("SCORE SUBMITTED TO GAME CENTER") return true end --for GameCenter, default to the leaderboard name from iTunes Connect local myCategory = "com.entailstudio.figure.ClassicSavers" if ( system.getInfo( "platformName" ) == "Android" ) then --for GPGS, reset "myCategory" to the string provided from the leaderboard setup in Google myCategory = "CgkI59bk84McEAIQBg" end gameNetwork.request( "setHighScore", { localPlayerScore = { category=myCategory, value=score:get("score") }, listener = postScoreSubmit } )
The code, as you see, is taken from official tutorials, so i totally lost.
I read all threads that fits somehow my problem. And no, this is not a time lag of sang boxed Game Center - almost 2 weeks now to score. I even tried to post some random score, when i throught that there might be value format error - no, still nothing. And i can’t provide any logs - no reason, because console prints no errors at all.
Hope someone will help me!