Hello,
I am developing an FB Instant Game and I am trying to implement fb contextual leaderboard.
I am trying to play the game via the Messenger.
At the beginning of the game I have a script, which for debugging purposes tries to get a leaderboard and its entries. Before querying for the leaderboard, I am trying to get the player id, player name, context id and context type. I am able to get all of those. After that I am doing a get_leaderboard call. However, this last call seems to stop the game from playing, and it also gives an error in the console:
FBInstant_PlatformStartGameAsync - error: Pointer_stringify is not defined
So instead of seeing the game menu I see a black screen. The main collection has a sound controller, which starts playing on start, and this works fine (I can hear the sound looping).
This is the code:
(1/2)
(2/2)
And this is the console in the browser:
Here is the leaderboard set up in the fb developer dashboard:
What’s a bit puzzling to me is that the “ERROR! Unable to start game” gets called AFTER that if block is actually passed. It looks as if the fbinstant.start_game was called again somewhere.
If I comment out the leaderboard calls then it works just fine: I get the player and context data and can keep playing.
Defold version: 1.2.174
What could be the issue here?