Syntax error help?

Error-The body of “Practice.MoveObject(UnityEngine.Transform, UnityEngine.Vector3, UnityEngine.Vector3, float)” cannot be an iterator block because void is not an iterator interface type

using UnityEngine;
using System.Collections;

public class Practice : MonoBehaviour {
		public Vector3 pointB;
		public Vector3 pointA;	
	    public float rate = 0.0f;

   

 public float y = 0.0f;
  

  public float z =0.0f;
      public bool show = false;
	 
       public void Start()
	{

		pointA= transform.position;
		while(!show)
		{
		 yield return new MoveObject(transform, pointA, pointB, (float)3.0);
         yield return new MoveObject(transform, pointB, pointA, (float)3.0);
					
		}
		
	}

   void Update () 
    {
		
	
	}
public void MoveObject(Transform thistransform,Vector3 startpos,Vector3 endpos,float x)
	{

rate = (float)1.0/x;

	

while(z<1.0)
	{
		z+= Time.deltaTime*rate;
			

thistransform.position = Vector3.Lerp(startpos, endpos,z);
    					  yield return 0 ;
		}
	}
}

instead:

public IEnumerator Start()

^^^^^^
Start is allowed to be a coroutine, but you have to declare it as such.

The error message you got means you are yielding in a method that is not a coroutine.

edit: but also the method you are yielding needs to be declared with IEnumerator and called with StartCoroutine(). Seems maybe not optimal. Maybe there is a differnt way to approach this practice?

yeah it working but now i got new error.
Practice.MoveObject(UnityEngine.Transform, UnityEngine.Vector3, UnityEngine.Vector3, float)' is a method’ but a `type’ was expected