Cant Get it to work=/ with multiple animations at the same time

Im doing something wrong/isnt codeing right please help me with the script=)

function Update ()
{
if (Input.GetAxis (“Vertical”))

animation.CrossFade (“run”);
else animation.CrossFade (“idle”);

if (Input.GetAxis (“Horizontal”))
animation.CrossFade (“run”);
else
animation.CrossFade (“idle”);

}

what is exactly the problem do you have?, the player don´t move or moves badly?

you can try using || :

function Update () {
if (Input.GetAxis("Vertical") || Input.GetAxis("Horizontal"))
   animation.CrossFade("run");

else 
   animation.CrossFade("idle");

Have you attach an animation component onto your object? Is there some sort of error or just the codes not working. I think the one posted above me should work. If not check your animation.