I spent a lot of time to compile my application. Finally, it does not crush on line
Now it's crushing here:
require "gaming"
googleplay = Gaming.new("googleplay")
Gaming.login()
googleplay:addEventListener(Event.LOGIN_ERROR, self.loginComplete, self)
googleplay:addEventListener(Event.LOGIN_COMPLETE, self.loginError, self) |
Android Studio log says: "MenuScene.lua.jet:178: bad argument #1 to 'login' (Gaming expected, got no value)"
So, what should i pass to that login method??? And am I use plugin correctly?
Comments
To activate the Gaming plugin:
API Reference
Methods
Events
Cloud Events
https://github.com/gideros/gideros/blob/master/plugins/gaming/install.html
Likes: MoKaLux
And why u are using like this: When docs says:
P.S. no need to copy whole file data here
It works both ways; you use the Gaming class directly, I use an instance of the initiated class. If you use the Gaming class directly, you have to always send the instance to it as a first parameter. This can get confusing, which is why I prefer to work with the instance instead.
For instance, when you load high scores you would have to write it like this if you use the class directly:
The "param1, param2" from the docs indicate there may be parameters per specific network. Google Play doesn't require a parameter for its login method.
I copied and pasted the API because of your "Again, wasted a lot of time to find out how to use this plugin, cuz no docs" comment.
Likes: MoKaLux
Likes: totebo
And i know about those "install.html" files in "All plugins" folder, but those docs could be a little bit better than it is now.
For example, instead of
And of course, fix the installation part, cuz it dint help much.
Oh, and btw, can someone explain how to show multiple leaderboards? I have 4 (because 4 difficulties), and i want to load menu (from GP services) where player can select one of four leaderboards. Right now, i can show only first leaderboard (well, i can pass the id to "loadScores" method and load any other, but that's what i don't need) . Is it possible?
@rrraptor, the Gaming.login() and instance:login() is a Lua thing (rather than a Gideros thing), and it has confused me no end over the years. Starting to half-understand it now, buy it's still confusing.
Not sure I understand what you mean about "choosing your score". If you're looking for a drop down to select the score, or just four buttons, that's something you have to code. And as for choosing high scores in general, iOS recently removed the functionality to display specific high score tables, so it would only work on Google Play anyway. If you want to manually load the scores for a specific table and manually display them on screen, that's still possible with loadScores().
i have 4 different tables in GP console:
Now, how to display menu where player can select a table he needs? Like this one:
I believe that it was made by using GP services.
As far as I know Google Play don't allow you to add high score boards into sub-categories.
such as
If we don't create, then what achievements does it load?
Something global from Google Play?
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: Apollo14
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
All I have in my 'main.lua':
my android player's package name is 'com.mydomain.gplayer'
while in 'Google Play console' -> 'Game services' I've written package name 'com.mydomain.anotherapp'
We can't test googleplay gaming services on Gideros Android Player when package names differ?
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Likes: Apollo14
Then I've exported Gideros Android player with package name "com.strongsun.gplayer", that I've written in the console.
But I'm receiving the same "LOGIN ERROR: Could not sign in".
What else do I need to do? Upload gideros android player apk to developers console?
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
https://deluxepixel.com
1. Export as production .apk, with a keystore that isn't debug
2. Enable Google drive in the Google Play console. I had to do this to make logins work the other day. Mysterious and undocumented.
Likes: Apollo14
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
https://developers.google.com/drive/api/v3/enable-sdk