playMaker

Author Topic: How to convert string to int which is digit value with thousand-separator?  (Read 2933 times)

TommyA

  • Playmaker Newbie
  • *
  • Posts: 26
Hi,
I'm using NGUI and PlayMaker.
Here is NGUI label which has price value like 10,000.
(this value is came from C# code)
I just need to convert this string value to int for calculation.
(using "get property" + "convert string to int" action)
But as you know, there is "thousand-separator" so converting to int dosen't works.
Any advice?
 

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

 I created a new action for this, it simply expose number styling property and will convert a lot more formatted strings like yours by default.

http://hutonggames.com/playmakerforum/index.php?topic=4252.0

bye,

 Jean

TommyA

  • Playmaker Newbie
  • *
  • Posts: 26
Thank you Jean.
It works great!