function + array problem

Blitz3D Forums/Blitz3D Beginners Area/function + array problem

can you pass arrays into functions? im having a rough time with this


Dim spells  (100)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; spell images
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
spells(1) = LoadSprite ("particleImage4.bmp")


While Not KeyHit(1)
	If MouseDown (1) Then	createParticles ( spells(1) )


ok and in the function i have this:

Function createParticles (particle)
par.T_particle = New T_particle
		par\ent    = CopyEntity (particle)


basically i want to store spells in an Array, and pass the reference of the spell into the function so the function can copy the preloaded *spell*. Is this possible? I keep getting errors.