SuperStrict Global ItemList:Tlist=New Tlist Type Item Field A:Int Function Create:Item(B:Int) Local Item:Item=New Item Item.A=B ListAddLast ItemList,Item End Function End Type For Local Index:Int=1 To 10 Item.Create(Index) Next For Local Temp:Item=EachIn ItemList Print Temp.A Next For Local Index:Int=1 To 10 Local RandomItem:Item=ItemList.ValueAtIndex(Rand(0,CountList(ItemList)-1)) Next
Can someone please help... I want RandomItem to be a randomly selected Type instance.