question

David Jones avatar image
David Jones asked

Another data type in leaderboard

Hi, I need to use a different data type for leaderboards rather than an integer. My goal is to store times for the fastest time in my game. Due to these times being very small it would have to be a number like 0.523, or 3.122. Is there a way to store this statistic another way so it doesn't have to be an integer? I thought about using player read only data however it doesn't work itself into leaderboards like statistics do. Thank you.

Leaderboards and Statistics
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

Hey, Statistics are indeed uint32 values and there is no other data type for now. However, you could try to use a smaller unit, for example, assume that 0.523 means 0.523 seconds, then 0.523 seconds equal to 523 milliseconds, 523000 nanoseconds and so on. In this way, you should be able to store your statistics properly.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Jones avatar image David Jones commented ·

Oh wow yes thank you that makes a lot of sense.

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan David Jones commented ·

I'm glad it helped:)

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.