Without seeing the code or having an exact error message I'm not sure what's wrong. You'd make an array like Local arr:TSound[] then when you add a new object use a slice arr=arr[..inc+1] and arr[inc]=obj see the language reference for arrays and slices.
You can also use a list with Local list:TList=New List and then ListAddLast list,obj with a loop For t:TSound=EachIn list and as it's in order you can index them like you would an array with this sort of thing count:+1 ; If count=sound5 then Exit, lists are more flexible than arrays.
Also if you're not sure about how something works, start with it on its own before adding it to a project, I do that quite a bit.
|