Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Gunfire_JackH's avatar
Gunfire_JackH
Honored Guest
9 years ago

Achievements - issue using Unreal's Write Achievement Progress node for Count type achievements

Using UE 4.16.2

Works just fine for EAchievementType::Simple achievements, however when incrementing an EAchievementType::Count type, due to the float Progress pin, Oculus spits out the following error message: Could not float convert to uint64

VariantData's type is float as expected, so the following Oculus code fails.

FOnlineAchievementsOculus::WriteAchievements
...
case EAchievementType::Count:
uint64 Count;
GetWriteAchievementCountValue(VariantData, Count);
RequestId = ovr_Achievements_AddCount(TCHAR_TO_ANSI(*AchievementId), Count);
break;

I can modify the Oculus code and rebuild the engine to fix the issue, but hopefully you already have a CL I can integrate - or a better / correct way to increment Count based achievements.

Please advise. TY

2 Replies

Replies have been turned off for this discussion
  • juanoldinho's avatar
    juanoldinho
    Heroic Explorer
    Thank you for reporting this issue. I will pass it along to our internal team for review and keep you updated.


  • Thank you for reporting this issue. I will pass it along to our internal team for review and keep you updated.


    You're welcome.  I made the following change to fix it locally.

    void FOnlineAchievementsOculus::GetWriteAchievementCountValue
    ...
    		case EOnlineKeyValuePairDataType::Float:
    {
    float Value;
    VariantData.GetValue(Value);
    OutData = static_cast<uint64>(Value);
    break;
    }