Open NeroNekro opened 2 years ago
Without the part game_center.authenticate() I get the error "player is nil". With this part the game_center open on iOS. Is there any function to authenticate without open gamecenter?
You should always authenticate user to use GameCenter functionality. On real device GameCenter controller will display single time.
Furthermore I get the following error:
https://github.com/godotengine/godot-ios-plugins/blob/master/plugins/gamecenter/game_center.mm#L124 post_score
should contain both score
and category
keys.
Tested your project, I'm not getting the error that you have posted, but I'm getting script error:
2021-12-10 10:37:52.737761+0300 testapp[10264:10008889] 0
2021-12-10 10:37:52.737901+0300 testapp[10264:10008889] SCRIPT ERROR: Invalid operands 'String' and 'int' in operator '+'.
2021-12-10 10:37:52.738065+0300 testapp[10264:10008889] at: _on_gamecenter_pressed (res://Control.gdc:50) - Invalid operands 'String' and 'int' in operator '+'.
You shouldn't use +
sign for String
and int
which is result of methods, str(result)
should help you with that.
Also category
is a leaderboard identifier, not it's name, so this also can be an issue.
Edit:
Also, to test InAppPurchases you have to use TestFlight version of app or create StoreKit Configuration File
, which will allow to test purchases in debug mode.
Hello there,
I try to use the GameCenter Plugin, but it not works.
I use this piece of code:
Without the part game_center.authenticate() I get the error "player is nil". With this part the game_center open on iOS. Is there any function to authenticate without open gamecenter?
In the documentation is the dictionary a litte bit unclear. On one section the key called "score" in another section "value".
Furthermore I get the following error:
on this link you get a little project, with a gamecenter function and a in app purchase function. Both not working. https://1drv.ms/u/s!Ah2_A51TSFE1g7k0x5ylXLWFpLmoJQ?e=x1W2lU
thanks