The Daily Click ::. Forums ::. Klik Coding Help ::. Random Numbers
 

Post Reply  Post Oekaki 
 

Posted By Message

Shawn Wolfram



Registered
  15/08/2003
Points
  435
1st April, 2004 at 18:18:17 -

I need to set up something that makes an alterable value have a random number between 1 and 10, It seems easy but how can I do that?

 
http://www.myspace.com/gidek = Myspace is for fags.

<fag?

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
2nd April, 2004 at 07:01:21 -

Random(10) produces either 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9.
Random(10)+1 produces either 1, 2, 3, 4, 5, 6, 7, 8, 9 or 10.

 
gone fishin'

Shawn Wolfram



Registered
  15/08/2003
Points
  435
2nd April, 2004 at 14:44:55 -

Thanks everyone.

 
http://www.myspace.com/gidek = Myspace is for fags.

<fag?

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
2nd April, 2004 at 16:23:34 -

No, it's probably you doing something wrong

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Arf :: FPP Games



Registered
  15/05/2002
Points
  1364
2nd April, 2004 at 16:32:32 -

Random(A) + B

A says how many numbers will be generated. B says which will be the first of them.

So:

random(2) + 3 = 3,4
random(5) = 0,1,2,3,4
random(6) - 3 = -3,-2,-1,0,1,2

 
n/a
   

Post Reply



 



Advertisement

Worth A Click