InAppPurchaseProductInfo DisplayPrice always converts to 0.0 float

InAppPurchaseProductInfo DisplayPrice always converts to 0.0 float.

UE 4.12

The string DisplayPrice from InAppPurchaseProductInfo always returns 0.0 when converting to a float. The correct price is however displayed on text components.

,

Could you please show screenshots of how you set your blueprint up? Is this working correctly in PIE but not in a packaged build?

Thank you!

Hello , far as I know calls don’t work in PIE, and only work in packaged builds. So this is working in neither.

I’m not in front of my work station at the moment so I can’t show you the blueprint visually. However, all I’m doing is dragging a ‘string to float’ node off from “DisplayPrice” from a returned InAppPurchaseProductInfo.

I can drag the DisplayPrice to a textbox(UMG) and the right price is displayed, but when converting to a float 0.0 is always shown.

Eg: if I convert to float then input float into textbox 0.0 is shown. But float also shows 0.0 in math checks as well.

Here you go

I’m not receiving numbers when I set this up, I’m receiving true/false instead. It’s possible that something is set up differently than what you have, since this blueprint only shows part of your full blueprint.

When you were setting up your in app purchase blueprint, did you review our [documentation][1] on the topic? If not, that would be a good place to start.

I checked too, to see if there were any bugs in place. I did not notice any. Did you make sure to change the value of your float in the node?

Looking forward to hearing back from you, thanks!

How to Use In-App Purchases in Unreal Engine Projects on Android | Unreal Engine 5.1 Documentation

The string to float conversation from DisplayPrice always returns 0.0, no matter what the value is. I believe you’re checking the bool response, not the float. I’m getting the IAPProductInfo from ReadInAppProductInformation. I’m fairly sure it’s a bug, other numeric strings convert to floats properly but DisplayPrice does not.

,

Could you please provide me a sample project of yours? I went back in and changed the float > float to a float/float (just as an example) and received a number feedback instead of a true or false. But I still believe that with what you have provided, it’s still possible for me to come out with a different result based on not being able to see the whole blueprint.

If you’re willing to provide a sample project, feel free to upload it and provide it to me through a private message on the forums.

I’m going to continue to look at this and edit my post (or respond, if I hear back from you first).

By the way, I am in 4.13 Preview 2 currently. I can switch if necessary. We do try to check in newer versions of the engine as changes are submitted.

Thanks!

I’m downloading 4.13 Preview 2 to determine if the problem still exist past 4.12. Is it possible I can see your technique to try it against mine? I’ll update when 4.13 p2 is installed.

Still an issue in 4.12 p2.

Here’s the full code, very basic stuff; not a lot to break.

Just noticed the Raw Price option that’s new to 4.13 p2. That seems to resolve the issue.

Glad you were able to resolve the issue. Please let us know if you run into any other complications.

Thanks!