math.randomseed(os.time())
local x = math.random(0,10)
local y = math.random(0,10)
while x == y do y = math.random(0,10) end
Now, x will never equal y after that line of code.
This might not be the best way. If this were a true random number generator, I suppose it's possible for the program to be stuck there forever; however, I wouldn't worry about it that much. _________________
I don't know where I'm going, but I'll figure it out when I get there.
math.randomseed(os.time())
local x = math.random(0,10)
local y = math.random(0,10)
while x == y do y = math.random(0,10) end
Now, x will never equal y after that line of code.
This might not be the best way. If this were a true random number generator, I suppose it's possible for the program to be stuck there forever; however, I wouldn't worry about it that much.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum