playMaker

Author Topic: IAP > GameAnalytics string problem  (Read 2147 times)

jess84

  • Hero Member
  • *****
  • Posts: 515
IAP > GameAnalytics string problem
« on: September 23, 2014, 02:32:56 PM »
I'm guessing this is one for Jean...

OK, so I'm using android native to return my item's "Price" as a string, and it returns it as "£1.50". I then use that string to display on my in-game menu.

Now to get this to a usable variable for GameAnalytics reporting, I'm having trouble.

If I use "Convert String to Float", I obviously get a "FormatException: Input string was not in the correct format" error.

So I then tried "Convert Formatted String to Float" (followed by "Convert Float To Lowest Currency Unit"), but I can't see to get a valid output, it's giving a lot of errors.

I've tried a few of the 'number styles', but haven't yet found anything that works. I tried 'Currency' and 'Allow Currency Symbols'.

I'm doing all of this on my android device, (as in Unity I can't get the returned values from Google Play), and I'm now at a loss.

Any ideas how to get from this string to an int in a format that GameAnalytics likes?

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: IAP > GameAnalytics string problem
« Reply #1 on: September 23, 2014, 06:19:37 PM »
Hmm, one of my problems could be related to the 'Convert Float to Lowest Currency Unit' action.

See screenshot.

Why is my state stopping at this action?!  There's no reason for it to do so. Both value are valid, yet it's not progressing to the next action!

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: IAP > GameAnalytics string problem
« Reply #2 on: September 23, 2014, 06:50:26 PM »
I've switched this to a simple Float Operation + Float to Int actions.

If 'Convert Float To Lowest Currency Unit' is broken, e.g. doesn't finish, then someone might want to fix it...   ;)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: IAP > GameAnalytics string problem
« Reply #3 on: September 24, 2014, 12:37:05 AM »
Hi,

 good point, I'll let the team know for the next update.

 Bye,

 Jean