Hi Golelorn, yes I believe all of us go through this. We all want to pass different types into the same functions.
While this is not possible, you can always work on some tricks.
One of them is about putting similar types inside a greater type.
function LoadLevel(Pipes as Pipes[], Flag as integer)
LevelPipes as integer[]
if Flag=0
LevelPipes=Levels[0].LevelPipes
else
LevelPipes=Levels[0].LevelInteractions
endif
...Add here the for... next with the LevelPipes now
endfunction
You can also do the same with 2 different types passing both of them as arguments inside the same function and checking which one to process using conditionals. The good thing you can assign a local array to get the type data and then do the inverse path to update the type if necessary (don't forget to use "as ref" though).
Hope it helps!