The Daily Click ::. Forums ::. Klik Coding Help ::. TGF random numbers
 

Post Reply  Post Oekaki 
 

Posted By Message

TCC



Registered
  21/05/2006
Points
  40
31st May, 2006 at 20:10:37 -

how do i write if i want alterable value A set to random from -10 - +10

 
hm?

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
31st May, 2006 at 20:19:54 -

random(20)-9 I believe gives you what you're looking for.

 
Craps, I'm an old man!

Deleted User
31st May, 2006 at 22:44:01 -

Yeah...

 

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
31st May, 2006 at 22:49:48 -

Shouldnt it be -10+random(21)? Random(x) = 0 to (x-1), not 0 to x

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Werbad



Registered
  18/09/2002
Points
  235
1st June, 2006 at 08:45:41 -

random(20)-9 gives a result between -9 to 10...

 
n/a

TCC



Registered
  21/05/2006
Points
  40
1st June, 2006 at 16:22:03 -

thx

 
hm?
   

Post Reply



 



Advertisement

Worth A Click