Author Topic: Scientific Notations  (Read 607 times)

Is there a way to convert them into normal integers? I hate it when integers become greater than 999,999, they are saved as like 1.00e+7, then it loads as a string when it is read by the game.

I would like so that its not 1.00e+7 but rather 1000000.

mFloatLength(%num, 0);

After very high numbers, it has some flaws. (you should understand why it goes into negatives)
« Last Edit: March 21, 2010, 12:38:22 AM by Kalphiter »

I seriously just realized that it stops at the same point:
2147483647

Code: [Select]
function snToString(%string)
{
%split = strPos(%string,"e+");
if(%split == -1)
return %string;
%decimal = strReplace(getSubStr(%string,0,%split),".","");
%times = getSubStr(%string,%split + 2,strLen(%string) - (%split + 2));
%times -= strLen(%decimal) - 1;
for(%i=1;%i<=%times;%i++)
{
%zeros = %zeros @ "0";
}
return %decimal @ %zeros;
}
Just whipped this up

Yay thanks Kalph and Dest! I finally fixed my stupid bug, lol.  :cookieMonster:

Yay thanks Kalph and Dest! I finally fixed my stupid bug, lol.  :cookieMonster:
I didn't do anything useful

I didn't do anything useful
Dont worry, your just another good boy starts and eval plan  :cookieMonster:

Dont worry, your just another good boy starts and eval plan  :cookieMonster:

derp.

Code: [Select]
function snToString(%string)
{
%split = strPos(%string,"e+");
if(%split == -1)
return %string;
%decimal = strReplace(getSubStr(%string,0,%split),".","");
%times = getSubStr(%string,%split + 2,strLen(%string) - (%split + 2));
%times -= strLen(%decimal) - 1;
for(%i=1;%i<=%times;%i++)
{
%zeros = %zeros @ "0";
}
return %decimal @ %zeros;
}
Just whipped this up

Put this in VCE plz.