Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to "unformat" a number (e+17)?

Asked by 7 years ago

print(414324234234312314) will turn into 4.1432423423431e+17 if you tostring it or anything.

Is there anyway to get the real number and turn it into a string?

The reason I need this is because I'm creating a discord api, so that you can kick/ban/etc but the guild/channel/user id has to be a string, which is kinda annoying. It's not required, but would be convenient.

1 answer

Log in to vote
1
Answered by
evaera 8028 Trusted Badge of Merit Snack Break Game Jam Winner Moderation Voter Administrator Community Moderator Super Administrator
7 years ago

Your real problem is you are storing the snowflakes incorrectly. The Discord API always refers to these as strings so you should never be converting them to numbers.

0
I'm aware of this, I know snowflakes are strings, but. It'd still be nice to be able to use numbers to select channels and stuff fireboltofdeathalt 118 — 7y
Ad

Answer this question