Hi,
I'm writing on a dart scorer programm.
I'm stuck with implementing a random generator to choose a random start player.
I listed the members in an ini file like this:
[m1]
name = "Testname1"
[m2]
name = "Testname"
and so on...
I want to generate as many random numbers, as I have players in the ini.
But I don't want any duplicates of course and that's where I'm stuck.
here's the code:
Global $randomnumber[11]
$ini_sections = IniReadSectionNames(@ScriptDir & "\members.dat")
For $i = 1 To UBound($ini_sections) - 1
Do
$randomnumber[$i] = Random(1, UBound($ini_sections) - 1, 1)
Until $randomnumber[$i] = $randomnumber[$i - 1] = False
Next
_ArrayDisplay($randomnumber)
like this I can ensure that number no.2 doesn't equal number 1. But then I'm stuck idk how to move on.