Hello …
I’m having trouble with google play services. I can not understand his logic in Corona API documentation. The only command that seems to work is the game Network.request (“login”) which logs the local player. The rest, no matter what I do, nothing works.
local function requestCallback(isError)
if (isError) then
print(“login failed”)
else
print(“login success”)
end
end
print(“Calling login”)
gameNetwork.request( “login”,
{
userInitiated = true,
listener = requestCallback
})
For example: My game is made score, where the player has to get the highest score possible. During the game, in certain score, there is a speech and I joined together a 'unlockAchievement ". But as I said, nothing works.
local function conquista ( myAchievement )
gameNetwork.request( “unlockAchievement”,
{
achievement =
{
identifier = myAchievement
}
}
)
end
if (primeiraconquista == false) then
conquista(abrirconquista)
abrirconquista = “CgkIiP_n0sobEAIQCQ”
primeiraconquista = true
end
if score > 99 and contadoraudio[0] ~= true then
audio.play(apontos[0])
contadoraudio[0] = true
abrirconquista = “CgkIiP_n0sobEAIQAg”
conquista(abrirconquista)
elseif score > 499 and contadoraudio[1] ~= true then
audio.play(apontos[1])
contadoraudio[1] = true
abrirconquista = “CgkIiP_n0sobEAIQAw”
conquista(abrirconquista)
elseif score > 999 and contadoraudio[2] ~= true then
audio.play(apontos[2])
contadoraudio[2] = true
abrirconquista = “CgkIiP_n0sobEAIQBA”
conquista(abrirconquista)
elseif score > 1499 and contadoraudio[3] ~= true then
audio.play(apontos[3])
contadoraudio[3] = true
abrirconquista = “CgkIiP_n0sobEAIQBQ”
conquista(abrirconquista)
elseif score > 1999 and contadoraudio[4] ~= true then
audio.play(apontos[4])
contadoraudio[4] = true
abrirconquista = “CgkIiP_n0sobEAIQBg”
conquista(abrirconquista)
elseif score > 2499 and contadoraudio[5] ~= true then
audio.play(apontos[5])
contadoraudio[5] = true
abrirconquista = “CgkIiP_n0sobEAIQBw”
conquista(abrirconquista)
elseif score > 2999 and contadoraudio[6] ~= true then
audio.play(apontos[6])
contadoraudio[6] = true
abrirconquista = “CgkIiP_n0sobEAIQCA”
conquista(abrirconquista)
end
this is just one example. I can not save the score in my Leaderboard too. Nothing works, I do not understand the logic of it.
If any good with patience soul can help me, I thank you very much.