orel56000 Posted March 7, 2018 Posted March 7, 2018 when i do outputChatBox(50000000000000000000000) its print 5e+22 instend of 50000000000000000000000. how to fix that? I've tried tostring() and tonumber() but its not working..
Jayceon Posted March 7, 2018 Posted March 7, 2018 (edited) string.format("%.0f", 50000000000000000000000) The max returned value is: 49999999999999995805696 Lua numbers have limited precision, but you are trying to store a number that exceeds what can be stored. You'll need to use a different mechanism to store them and operate on these numbers. Search in Google with this keywords: "bignum" and "arbitrary precision numbers" Edited March 7, 2018 by Jayceon
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now