Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
gamekit.mm -Assigning to GKLeaderboardPlayerScope from incompatible type int- — Gideros Forum

gamekit.mm -Assigning to GKLeaderboardPlayerScope from incompatible type int-

HubertRonaldHubertRonald Member
edited October 2014 in Bugs and issues
Hi folks!

I had have some problems with gameKit.mm when I tried of create GiderosIOSPlayer over an iPad(iOS 8)
In case anyone reads this in the future here quickly solution (lines modified //--*** NSInteger)
static int showLeaderboard(lua_State* L)
{
	GGameKit* gamekit = getInstance(L, 1);
 
	NSString* category = nil;
    GKLeaderboardTimeScope timeScope = GKLeaderboardTimeScopeAllTime;
 
	if (!lua_isnoneornil(L, 2))
		category = [NSString stringWithUTF8String:luaL_checkstring(L, 2)];
 
	if (!lua_isnoneornil(L, 3))
		NSInteger timeScope= luaL_checktimescope(L, 3); //--*** NSInteger
 
	gamekit->showLeaderboard(category, timeScope);
 
	return 0;
}
 
static int loadScores(lua_State* L)
{
	GGameKit* gamekit = getInstance(L, 1);
 
	NSString* category = nil;
	GKLeaderboardTimeScope timeScope = GKLeaderboardTimeScopeAllTime;
        GKLeaderboardPlayerScope playerScope = GKLeaderboardPlayerScopeGlobal;
        int startEntry=1;
        int maxEntries=25; // Default
 
	if (!lua_isnoneornil(L, 2))
		category = [NSString stringWithUTF8String:luaL_checkstring(L, 2)];
 
	if (!lua_isnoneornil(L, 3))
		NSInteger timeScope= luaL_checktimescope(L, 3); //--*** NSInteger
 
    if (!lua_isnoneornil(L, 4))
        NSInteger playerScope= luaL_checkplayerscope(L, 4); //--*** NSInteger
 
    if (!lua_isnoneornil(L, 5))
   		startEntry= luaL_checknumber(L, 5);
 
    if (!lua_isnoneornil(L, 6))
   		maxEntries= luaL_checknumber(L, 6);
 
    gamekit->loadScores(category, timeScope, playerScope, startEntry, maxEntries);
 
	return 0;
}
Cheers!
+1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.