8
« on: December 11, 2012, 02:56:52 am »
Hi.
I'm having problems with game center and my last update of the game.
Recently i've implemented Ranking view in game... after that game center close after entering in and close.
There is the code for OnGameCenter:
[..............]
char mensaje[1000];
// Callback de GameCenter
void OnGameCenter(int type,int flag,int value,char *desc)
{
switch (type)
{
case 1: // Authentication
break;
case 2: // Achievements Post
break;
case 3: // Achievements Reset
break;
case 4: // Score Post
break;
case 5: // Leaderboard Rank
if(!flag) {
sprintf(mensaje,"Your rank is %d",value);
if (CONFIG_DIFICULTAD == 1) {
AlertShow("Normal Mode Ranking", mensaje);
} else if (CONFIG_DIFICULTAD == 2) {
AlertShow("Arcade Mode Ranking", mensaje);
} else if (CONFIG_DIFICULTAD == 3) {
AlertShow("Survival Mode Ranking", mensaje);
} else {
AlertShow("Global ranking", mensaje);
}
}
break;
}
//if(flag) {
// AlertShow("Game Center Error!!!", "An error has ocurred. Be sure that you are logged or you have internet connection.");
//}
}
[..............]