Jump to content

[HELP] Random number problem


Recommended Posts

Posted

You can only pass 2^31-1 bit integer arguments in the math class.

This means the maximum number you can represent is: 2147483647

You're getting a negative value because you're getting an integer overflow, meaning the value you're trying to represent is higher than the value I've just mentioned and therefore the bit signal is affected.

The solution for your problem is simple (assuming you really need a number that high):

  
local a = "" 
for k = 1, 12 do 
   a = a .. tostring(math.random(0,9)) 
end 
  

signatures.php?user=TIM3&combo=69&bg=1

Posted

as TAPL said try to use math.abs.

local salt = math.random(106060023000, 9919995299949969) 
local salt2 = math.abs(tonumber(salt)) 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...