Huge Numbers

[lua]
lua_run Msg( tonumber( 100000000000000 ) )
[/lua]

( 1 trillion )

This returns



1e+014


How do i make it not do that?

also,

[lua]
player:SetNWInt( “Money”, 100000000000000 )
[/lua]

has the same issue.

How do?

1e+014 is basically 1 * 10^14 which is one trillion.

He knows that, he just wants to know how to display the actual number, not scientific notation.

A trillion using the short scale is 1e12, for the long scale it’s 1e18. That’s a hundred trillion.

Anyway:
[lua]print( string.format( “%.f”, number ) )[/lua]
It starts getting inaccurate above 16 decimals though.

[editline]28th December 2013[/editline]

Also, Google first it next time maybe?

http://puu.sh/61dEw.png