HI.
I am trying to create the equivilant of a UDT and getting totally confused 
Basically I am trying to create stats storage for 4 riders.
Rider1
id
name
laptimes[]
Rider2
id
name
laptimes[]
and so on.
I have tried a few variations, non of which seem to even run. This is the only one I can get to run without error, but it doesnt do what I am wanting it to do.
[lua]local riders = {
id = 0,
name = 0,
riderno = 0,
lapno = 0,
laptime = {}
}
riders2 = {}
riders2[1] = riders
riders2[2] = riders
riders2[1].laptime[2] = 0
riders2[2].laptime[2] = 10
print(riders2[1].laptime[2])
print(riders2[2].laptime[2])[/lua]
When I run this example, Lap 2 has the same time for both riders2[1] and riders2[2]??
How can I write this so that an array of riders can have their own set of laps? Any help would be greatly appreciated.
thanks
[import]uid: 103163 topic_id: 20538 reply_id: 320538[/import]
