Skip to main content
New Participant
July 17, 2017

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
This topic has been closed for replies.

2 replies

Participant
July 17, 2017
Thank you for reporting this issue. I will pass it along to our internal team for review and keep you updated.
Please tag me, @juanoldinho, in your forum post/response if you need immediate assistance or want additional support or context on an issue you are having with our software or integrations. Having an issue with our platform, services, or integrations? Try using our new bug tool to report this and receive emailed updates as we proceed to address it internally.
New Participant
July 18, 2017


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;
}