Page 1 of 1

Random numbers

Posted: Sun Mar 06, 2005 4:11 pm
by ravagepn
I want to program a simple football manager game and I wonder if Pure Basic have support for random numbers ? A litle example of how do I generate them will be appriciated.

Posted: Sun Mar 06, 2005 4:31 pm
by Joakim Christiansen
You are going to create a football manager and you don't know how to get a random nuber? :lol:

It's all in the help file!
Syntax

Result = Random(Maximum)
Description

Returns a random number between and including 0 and the Maximum value. Additionally RandomSeed() can be used to change the actual seed of random number.

Note: each times a program start, a new seed is generated, so RandomSeed() is only useful when the programmer when always the same random number in the same order.