|
| 21 Aug 2016 05:48 PM |
local nums = { "k"; "M"; "B"; "T"; "Qd"; "Qn"; "Sx"; "Sp"; "O"; "N"; "De"; "DD"; } local value = 1334333333335 for i = #nums*3,1,-1 do if i % 3 == 0 and value < 10^i and value > 10^(i-3) then print(tostring(value)..nums[i]) break end end
doesnt work, basically the thing in miners haven
This siggy is copyrighted © |
|
|
| Report Abuse |
|
|
AxonMega
|
  |
| Joined: 29 Aug 2014 |
| Total Posts: 2403 |
|
|
| 21 Aug 2016 06:33 PM |
| Sorry, there's nothing we can do to fix stupidity. |
|
|
| Report Abuse |
|
|
pullman45
|
  |
| Joined: 09 Jul 2012 |
| Total Posts: 2891 |
|
|
| 21 Aug 2016 08:57 PM |
Why, just why?
Do you want the letters to go one by one? |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2016 09:06 PM |
get the exponent:
math.floor(math.log10(math.abs(num))) then get it like that |
|
|
| Report Abuse |
|
|