ID:165226
 
I was looking for a way to turn condensed number strings into a number itself. For example, one million: I want to turn 1e+006 into 1000000. (Or preferably with commas {1,000,000}).

Because my game will be dealing with large numbers most of the time, I NEED a code like this. I found one by Y2kEric, but you need to be subscribed, which I'm not. So I would appreciate any code on how to do this. Thanks.
In DM, go to the help menu and find Text2Num(). I think that's the one. You should get some information from that.



- Cliff H.
In response to Cliff Hatomi
I don't think thats right. After trying a number twice, 300M with that, they still came out 3e+008. I tried both:
text2num("300000000")
num2text(300000000)
In response to Cliff Hatomi
Wait, I think you're right. I forgot to add the ",12" after the large number. Thanks.
3e+008 becomes 300000000.
My first problem was solved, I just now need a code on how to get it so that there are commas in the correct spots of the numbers. Does anyone have an idea on how to do that? It's possible, I've seen it on a few games lately.
In response to Jay1
There's a second argument for significant figures. Look up "num2text" in the ref (F1 in Dream Maker).