playMaker

Author Topic: (SOLVED) publishing to google leaderboard ( format in millisecond's) don't work  (Read 1397 times)

pierre nay

  • Playmaker Newbie
  • *
  • Posts: 28
  • we used a vax to render spheres
m using playmaker as a scoring manager and I  am trying to publish my scores to Google's leaderboard in millisecond's which I believe requires the variable "long"  but it seems that playmaker doesn't support this format. Anyone can offer a direction to solve this ? thank you .
« Last Edit: February 07, 2021, 09:01:26 AM by pierre »

ch1ky3n

  • Full Member
  • ***
  • Posts: 208
Re: publishing to google leaderboard ( format in millisecond's) don't work
« Reply #1 on: February 01, 2021, 11:13:09 PM »
If it were me, i would make the timer as integer in the first place. but maybe yours have different requirements

pierre nay

  • Playmaker Newbie
  • *
  • Posts: 28
  • we used a vax to render spheres
Re: publishing to google leaderboard ( format in millisecond's) don't work
« Reply #2 on: February 02, 2021, 03:59:51 AM »
If it were me, i would make the timer as integer in the first place. but maybe yours have different requirements

Hi ch1.. , that's pretty much what I have as an option.. assuming then that type long is not possible at all on playmaker...thanks anyways.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: publishing to google leaderboard ( format in millisecond's) don't work
« Reply #3 on: February 02, 2021, 06:00:19 PM »
Hi.
What action are you using to place to the leaderboard?

if you make are making a custom action you can use float and convert to a long in the script.

pierre nay

  • Playmaker Newbie
  • *
  • Posts: 28
  • we used a vax to render spheres
Re: publishing to google leaderboard ( format in millisecond's) don't work
« Reply #4 on: February 03, 2021, 04:21:44 AM »
Hi.
What action are you using to place to the leaderboard?

if you make are making a custom action you can use float and convert to a long in the script.
thanks for your response; I am using GLEYS MOBILE TOOLS with playmaker support, the dev's cant find a solution and anything i read up suggests that "long" is not supported on playmaker./c#.  (I've tried to revise the script but without success).. script and note from dev here, if there is a way?
« Last Edit: February 03, 2021, 04:44:19 AM by pierre »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: publishing to google leaderboard ( format in millisecond's) don't work
« Reply #5 on: February 03, 2021, 08:20:07 AM »
hi.
you are able to convert a fsm int to a long in code.

you can see a sample in this action :

https://github.com/PlayMakerEcosystem/PlayMakerCustomActions_U5/blob/master/Assets/PlayMaker%20Custom%20Actions/Device/AndroidVibrateAdvance.cs

Code: [Select]
patternTemp[i] =  (long)setPattern[i].Value;setPattern is a FsmInt (array) value.

only thing is that you are limited to the Int range
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/integral-numeric-types

pierre nay

  • Playmaker Newbie
  • *
  • Posts: 28
  • we used a vax to render spheres
Re: publishing to google leaderboard ( format in millisecond's) don't work
« Reply #6 on: February 04, 2021, 04:50:38 AM »
thanks for the explainer Djaydino,
I was barking up the wrong tree, so no need to declare long but reformatting Int  to long is possible , albeit what Djaydino pointed out : length limitation is still there.
note:  convert seconds to integer and multiply by (1000) to get milliseconds prior to converting to Long.