you have to use unique variables for each copy ie.
an array e(i) = copyentity(s) or a type e\entity = copyentity(s)
for i = 1 to 3
FreeEntity e(i)
next
an array e(i) = copyentity(s) or a type e\entity = copyentity(s)
for i = 1 to 3
FreeEntity e(i)
next