Hi,
I can get my apps to see the corona cloud dashboard and also sign up/login the dashboard. I can even see the news or if i add new leaderboard in the dashboard. But I cannot get to submit the high score to the leaderboard. Here are my code. The Score = 118 is the value that are going to be high score for this example
[Lua]
CC_Access_Key = “6e0a8b215a25c0995caxxxxxxxxxxxxxxxxxxxxx”
CC_Secret_Key = “2f9a9b5e24d68580f814xxxxxxxxxxxxxxxxxxxx”
local gameparams = { accessKey = CC_Access_Key, secretKey = CC_Secret_Key, }
local gameparams = {}
gameparams.accessKey = “6e0a8b215a25c0995caxxxxxxxxxxxxxxxxxxxxx”
gameparams.secretKey = “2f9a9b5e24d68580f814xxxxxxxxxxxxxxxxxxxx”
gameparams.supportedOrientations = { “landscapeRight” }
gameNetwork.init( “corona”, gameparams )
gameNetwork.set( “debugEnabled”, true )
local function authListener(event)
--handle Cloud authorization here
end
cloud.init( CC_Access_Key, CC_Secret_Key, authListener )
local leaderboardID = “514a9f74b63354xxxxxxxxxx”
– Submit High Score start here
print ( “Best Score:”, bestScore )
print ( “Game Score:”, gameScore )
print ( “Score:”, score )
print ( “The Score:”, theScore )
local touchSubmitLeaderboardBtn = function( event )
if event.phase == “release” and SubmitLeaderboardBtn.isActive == true then
SubmitLeaderboardBtn.isActive = false
score = theScore
local leaderboards = cloud.leaderboards
print ( “leaderboard created”)
– Start Corona Game2
print ( “Leaderboard ID:”, leaderboardID )
print ( “Score:”, score )
--local function leaderboardHandler( event )
--end
local function leaderboardsListener( event )
end
leaderboards.submitHighScore( leaderboardID, score )
print (“leaderboards.submitHighScore( leaderboardID, score )”)
leaderboards.setListener( leaderboardsListener )
director:changeScene( “gotomainmenu” )
– End
end
end
if not SubmitLeaderboardBtn then
SubmitLeaderboardBtn = ui.newButton{
defaultSrc = “themes-btn.png”,
defaultX = 155,
defaultY = 59,
overSrc = “themes-btn-over.png”,
overX = 155,
overY = 59,
onEvent = touchSubmitLeaderboardBtn,
id = “SubmitLeaderboardBtn”,
text = “”,
font = “Helvetica”,
textColor = { 255, 255, 255, 255 },
size = 16,
emboss = false
}
SubmitLeaderboardBtn.xOrigin = 200; SubmitLeaderboardBtn.yOrigin = 600
SubmitLeaderboardBtn.isVisible = false
gameGroup:insert( SubmitLeaderboardBtn )
end
[/Lua]
The Error In Simulator Output Is As in the photo.