Arrays of entities

Blitz3D Forums/Blitz3D Beginners Area/Arrays of entities

I've tried creating an array of entities within a function but it doesn't seem to work.

eg.
Dim actors(10)
For n=0 to 9
  test_func(actors(n))
Next

camera=createcamera()
pointentity camera,actors(0)

Function test_func(entity)
  entity=CreateSphere(8)
  PositionEntity entity,Rnd(-3,3),Rnd(-3,3),Rnd(-3,3)
End


The spheres are created and spread around but I'm told the entity actors(0) doesn't exist. Anyway I can create entities within an array in functions?