How do you go above 1SX

im making a clicking simulator and when ever the player hits 999QN and they get +1QN it shows 1000QN and then if they get even 1 more it force deletes their save data and put it at 0 … it appears to roblox based as i have tried everything and nothing i do seems to fix this…
ik it has a fix as games with 1QNSXDOUNDETREQUSECTREUNDE as a currency exist

so if you know how to fix this please let me know

5 Likes

just store the number of clicks in the datastore as a string and then get it with tonumber unless roblox datastore limits strings and i didnt know lol

3 Likes

no not when it saves i mean in real-time the in-built leader board in roblox

3 Likes

If you’re using IntValues, switch to NumberValues. Ints have a much lower limit than floats (NumberValue using floats).

If you’re trying to go above 10^308/1e+308 (float limit) then I recommend InfiniteMath, but I’m guessing for your case you won’t need it.

You could also check for math.clamp, you might be clamping the numbers so they can’t go above a certain number. It might also be an issue with your games calculations in specific, you should look through your math and double check.

5 Likes

im using ints… ill switch and see if that fixes it, if it does ill mark yours solution. thx

3 Likes

it now alows me to go above 1sx but it still does:
2023-08-13_20-15-15

3 Likes

Seems like your suffix function is messing with something, try replacing it with this (you can edit the Suffixes table to use ones you prefer)

local Suffixes = {'K','M','B','T','QD','QN','S','SP','O','N','D'}

local function Suffix(Number)
	if Number == 0 then
		return "0"
	end
	
	local Sign = math.sign(Number)
	Number = math.abs(Number)
	
	local Zeros = math.floor(math.log(Number, 1e3))
	local v = math.pow(10, Zeros * 3)
	return ("%.3f"):format((Number / v) * Sign):gsub("%.?0+$", "") .. (Suffixes[Zeros] or "")
end
3 Likes

ill try, hope it works

(111111111111111)

3 Likes

lol my output rn:

(blurred for personal saftey)

3 Likes

I guarantee you that your output does not have anything that can expose your personal information

4 Likes

some of my notes appear… :\

(111111111)

3 Likes

i tried everything but for some reason your script isnt working

3 Likes

Could you send the code where you’re getting the errors? All you should need to do is Suffix(Number) and it will return a string of the number formatted

It’d really help to have the errors as well, without them I don’t know what’s going wrong. You can just only blur your notes if they need to be private.

local Number = 1000000
local Formatted = Suffix(Number) -- you can't do math with this, its a string now
print(Number) -- prints "1M"
3 Likes

here ill send you my original script
(fun fact i can get it to say 1SX and 1SP etc. but only if i use “developer hax”)

3 Likes

did in bad graphics/filter on purpose lol… im very secretive

2 Likes

If I were you, I’d use SI units:
“K” is thousand.
“M” is million…

But:
“G” is 10**9
“T” is 10**12
“P” is 10**15
“E” is 10**18
“Z” is 10**21
“Y” is 10**24

New prefixes, as of 2022!
“R” is 10**27
“Q” is 10**30

After that (or before, if you want), use scientific notation. For example, the number 53 followed by 29 zeroes could be 5.3e30.

2 Likes

I use this list, which goes up to about 10^12000 (Ever heard of a Trillinovenonagintanongentillion? haha)

3 Likes

thank you my original list went only till: Novenonagintanongentillion - NNA lol so thanks

  1. Overflow Handling: The issue you’re experiencing might be related to an overflow error. When the currency value exceeds a certain limit, it can cause unexpected behavior. Ensure that you are using data types that can handle large numbers, such as BigNum or BigInt, to prevent overflow issues.
  2. Save Data Handling: Check your save data system to ensure that it properly handles large currency values. Verify that the save data is correctly storing and retrieving the currency value without any loss or corruption.
  3. Data Validation: Review your code that checks for the currency value and triggers the reset. Make sure that it accurately detects the conditions for the reset and doesn’t have any unintended side effects or logic errors. Double-check the comparison operators and conditions used in the code.
  4. Testing and Debugging: Conduct thorough testing to pinpoint the exact point where the issue occurs. Use print statements or logging to track the currency value and identify any unexpected behavior or errors that may occur during the process. This will help you narrow down the problem and identify potential solutions.

Else just make the value “inf”, thats it lol

1 Like

Please also consider localisation. A billion is either 10**9 or 10**12, depending on where you’re from. I don’t want to see the world any more angloformed than it already is.

That’s why I recommend SI prefixes.

When is the last time I’ve heard of a 512 BB drive?

1 Like