error CS0029: Cannot implicitly convert type `UnityEngine.Transform' to `UnityEngine.Vector3'

using UnityEngine;
using System.Collections;
using FSM;

public class Action_walkfoward : FSMAction
{
private Vector3 moveDirection = Vector3.zero;
public float gravity = 10.0F;
public float speed = 3.0F;
public void execute(FSMContext c, object o)
{

	moveDirection = new Vector3(0,1,0);
    moveDirection *= speed;
	moveDirection.y -= gravity * Time.deltaTime;
	---->//moveDirection = c.gettransform();
}

}
i created a fsm context that gets the transform and sets it as the direction. what i am trying to do get my character to move on its own the error i am having is converting it. also i am not sure if the way i am doing it will work. this is in my context------

public Transform gettransform()
{
return Controller.transform;
}
public void setcontroller(Transform pos)
{
pos = Controller.transform;
}

I’m sorry, I couldn’t read your code (you didn’t format it nicely). However, just glancing at it, your problem is that a Transform is not a Vector3. A transform is all the position, rotation, scaling, etc. information for an object. Instead of using Vector3 whatever = transform;, you likely need to use Vector3 whatever = transform.position;

transform.position is the position of the object, and is a Vector3. Likewise, transform.scale is a Vector3, and transform.rotation is a quaternion.

Good luck.

I don’t know anything at all about FSM but it seems like you should be doing

moveDirection = c.gettransform().forward;