I need a little bit help on this one:
I create a global "gDatabase" list, each time user enter the new data
will be capture in this global list....
Now I need to create multi. cylinder inside the 3d world with each
record in gDatabase... I used the repeat function which loop until all
the records in the "gDatabase" EOF
When I run the program, this error occur:
Script error: variable used before assign the value
pCylinder[i] = pWorld.newModel("my cylinder", cylinderresource[?i]
)

below are my code: can some one please help me, thanks alot

repeat with i=1 to (ItemRecord -1)

temp1 = float(gDatabase[i].lat)
temp2 = float(gDatabase[i].long)
temp3 = float(gDatabase[i].date)

y = ((temp1 - XLat1)/(XLat2 - XLat1))*(MaxLat - MinLat)+(MinLat)
x = ((temp2 - YLong1)/(YLong2 - YLong1))*(MaxLong - MinLong)+
(MinLong)
z = ((temp3 - MinDate)/(MaxDate - MinDate))*(MaxZ-MinZ)+(MinZ)
--make the resource
-- problem occurs

cylinderresource[i] = pWorld.newModelResource("my cylinder",
#cylinder)
cylinderresource[i].topradius = 5
cylinderresource[i].bottomradius = 5
cylinderresource[i].height = z
pCylinder[i] = pWorld.newModel("my cylinder", cylinderresource[i] )

-- transfor the cylinder to correct spot
pCylinder[i].rotate(90,0,0)
pCylinder[i].transform.position = vector(x,y,z/2)

end repeat