First of all, I recommend using Randomize at the beginning of the program (it changes the number selection algorithm).
To get a random number between two numbers, you need the following:
Result:=Min+random(10000)mod max + 1;
I donโt remember the maximum value for random, so you can change it (it does not change anything).
Using 'mod', you get the module from the Random and max sections. +1 is necessary because you will never get the number = max, only the number that = max-1, so you need to write +1.
Good luck
proggamer12
source share