Problem in fitting (in function!)

You created histogram hist0 with 1 bin only…