Ich spreche über rbx.Lua so, wenn Sie es nicht gut kennen, versuchen Sie nicht, dieseGibt es eine Möglichkeit für Zahlen, die Ganzzahl max in lua mit Zeichenfolgenwerten zu überschreiten?
function ConvertShort(num, cool)
local x = tostring(num)
if #x >= 16 then
local important = (#x - 15)
cool.Value = x:sub(0,(important)).."."..(x:sub(#x-13,(#x-13))).."qd"
elseif #x >= 13 then
local important = (#x-12)
cool.Value = x:sub(0,(important)).."."..(x:sub(#x-10,(#x-10))).."T"
elseif #x>= 10 then
local important = (#x - 9)
cool.Value = x:sub(0,(important)).."."..(x:sub(#x-7,(#x-7))).."B"
elseif #x >= 7 then
local important = (#x-6)
cool.Value = x:sub(0,(important)).."."..(x:sub(#x-5,(#x-5))).."M"
elseif #x >= 4 then
cool.Value = x:sub(0,(#x-3)).."."..(x:sub(#x-2,(#x-2))).."k"
end
end
game.Players.PlayerAdded:connect(function(plr)
local cash = Instance.new("StringValue", plr)
cash.Name = "cash"
cash.Value = "0"
cash.Changed:connect(function()
ConvertShort(tonumber(cash.Value), cash)
end)
end)
So zu beantworten, wenn sie es zeigt eine nubmer wie 1e + 1.1K bis Trillionen bekommt Ich brauche es eher wie "1qd", und ich habe keine Ahnung, wie ich das beheben kann oder ob es überhaupt einen Weg gibt. Ersetzen