I was given a code that I modified slightly.
Type Horse
Speed As Integer
Name As String
EndType
#Constant MaxHorses = 5
Global Dim Horses(MaxHorses) As Horse
Global Performance As Integer
Global WinnerScore As Integer
Global WinnerID As Integer
Horses(1).Speed = 100 : Horses(1).Name = "Daisy"
Horses(2).Speed = 70 : Horses(2).Name = "George"
Horses(3).Speed = 50 : Horses(3).Name = "Daniel"
Horses(4).Speed = 20 : Horses(4).Name = "Jane"
Horses(5).Speed = 1 : Horses(5).Name = "Pixie"
WinnerScore = 0
For i = 1 to MaxHorses
Performance = RND(100)
If Performance + Horses(i).Speed > WinnerScore
WinnerScore = Performance + Horses(i).Speed
WinnerID = i
EndIf
Next i
Print "Winner is: " + Horses(WinnerID).Name
wait mouse
I want to have it so that it asks for the name of the first horse, then its speed, then the second horse, etc. and the user types it in. How would I do that? Any help would be appreciated. Thanks!