Skip to main content
New Participant
January 10, 2017
Solved

[UNREAL] Leaderboard Read is not returning the expected value

  • January 10, 2017
  • 6 replies
  • 2235 views
Hi!

I've setup my project in Unreal 4.14 to Read and Write to Oculus Leaderboards using the "Read/Write Leaderboard Integer" BP nodes. In Unreal I don't see any issues when writing to it. On reading however, it does a successful read, but I get an int value of zero. Any suggestions where I could be going wrong?

To Note, I still haven't pushed any copy of the project to Oculus yet, and am running it locally on my system. 
This topic has been closed for replies.
Best answer by RogueElessar
Had to dig around for a bit, but found my culprit. Since Oculus expects 64-bit ints when reading or writing values, Unreal sends the expected values. When reading, Unreal gets the 64-bit int but when saving it in the regular 32-bit int variable, it forces it to be zero.

Some kind of a warning here would have been appreciated ... :disappointed: 

6 replies

Inspiring
January 10, 2017
This should be in the Developer forum Unreal section. I'll move the thread. Thanks.
AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
RogueElessarAuthorAnswer
New Participant
January 11, 2017
Had to dig around for a bit, but found my culprit. Since Oculus expects 64-bit ints when reading or writing values, Unreal sends the expected values. When reading, Unreal gets the 64-bit int but when saving it in the regular 32-bit int variable, it forces it to be zero.

Some kind of a warning here would have been appreciated ... :disappointed: 
January 11, 2017


Had to dig around for a bit, but found my culprit. Since Oculus expects 64-bit ints when reading or writing values, Unreal sends the expected values. When reading, Unreal gets the 64-bit int but when saving it in the regular 32-bit int variable, it forces it to be zero.

Some kind of a warning here would have been appreciated ... :disappointed: 


So how did you fix it exactly? Can it still be used via the normal blueprint nodes?
Inspiring
January 11, 2017
Yeah, this needs to be fixed somehow :neutral:
Up and Coming
March 19, 2017
I'm a newb to this kinda stuff.  Where can I find documentation on how to implement leaderboards and achievements with unreal blueprints?
Participant
March 20, 2017
We have a fix to convert the 64-bit int back into 32-bit safely fix in our github version of UE4: github.com/Oculus-VR/UnrealEngine

This would eventually propagate to one of UE4's releases in the future.  Thanks for finding this.

> Where can I find documentation on how to implement leaderboards and achievements with unreal blueprints?

We don't have much specific unreal blueprints docs since most of it is an unreal blueprint that is already documented by Epic: 
https://docs.unrealengine.com/latest/INT/BlueprintAPI/Online/index.html