Hi
DBPRO cannot return user defined types from functions. You won't be able to pass in a UDT array as a parameter either.
What you can do is pass in an index for the array element, and change its values globally
Dim MyArray(1) as MyType
DoActionOnItem( 1 )
End
Function DoActionOnItem( index )
MyArray( index ).SpriteIndex = 1
EndFunction
You don't have all the freedom in the world, but at least this allows you to edit UDT arrays within a function.
There is also a
library made by Diggsey which allows you to work with references to UDT variable elements from functions, but this is more advanced.
Note that you can pass in a UDT variable into a function, but not an array variable; something like this would be necessary:
Item as MyType
Item = MyArray(1)
UseItem( Item )
End
Function UseItem( itemForUse as MyType )
` Do what ever
EndFunction