Needing Help With Random Numbersi have written a little bit of code that's suppsoed to generate random numbers, turn em into a string and put the value into a string variable., , Works fine in practice.....but it doesn't generate the numbers randomly, every time i run my programme it generates the exact same numbers :-/, , , here is a copy of my code, any help is greatly appreciated, , procedure intro;, begin, repeat, rnumber:= 1+random(4); //sets rnumber equal to the values 1 to 4, moves := IntToStr(rnumber); //turns the number into a string and palces the string into moves, for count := 1 to length(moves) do, begin, delay(700); //sets the delay to 700 milliseconds, flashtile; //calls procedure "flashtile", delay(700); //sets the delay to 700 milliseconds, resettile; //calls function "resettile", end;//for count :=1 to length(moves) do, until loopcount=0;, end;  deleted_member | Have you tried calling the Randomize procedure to initialize the generator before entering this loop? |
|