As far as I know, nested types are perfectly OK.
Your code example shows a nested FOR loop, not a nested type.
A nested type would be like this:
In your FOR loops, make sure that you are not doing something like deleting a type before your loop(s) has finished (just mark them for deletion), or else you may get errors.
Your code example shows a nested FOR loop, not a nested type.
A nested type would be like this:
Type seacreature Field creaturetype Field name Field weight Field length End Type Type seaentity Field entitytype.seacreature Field x Field Y End Type
In your FOR loops, make sure that you are not doing something like deleting a type before your loop(s) has finished (just mark them for deletion), or else you may get errors.