Memory corruption warning

Blitz3D Forums/Blitz3D Programming/Memory corruption warning

I sense the possibility for an EntityExists( ) command!

Function EntityExists( Entity )
	
	For Count = 1 To 10000
		
		Surf = GetSurface( Entity, 0 )
		ClearSurface Surf
		
	Next
	
	;If it gets to here, the entity exists!	
	Return True
	
End Function