Inconsistent Line Endings Error

I have made this quick script, to crossfade an animation with my walk and run animations.

But it comes up with a weird error saying:

There are inconsistent line endings in the ‘Assets/attackscript.js’
script. Some are Mac OS X (UNIX) and
some are Windows. This might lead to
incorrect line numbers in stacktraces
and compiler errors. Unitron and other
text editors can fix this using
Convert Line Endings menu commands.

My script is:

function Update () {

animation["my_animation"]. layer = 1;

if(Input.GetMouseButtonDown(0))
	animation.CrossFade("my_animation");

}

What am I doing wrong to get this error?

Thanks,

The solution to your problem depends on what external script editor you are using. The error is caused by as it says, line-endings. Its not a coding error in the sense that you typed something wrong so that should be a relief.

Somewhere in your script editor, there should be a drop down for line endings. Find the platform you’re currently working on and choose that one. That should fix it.

VS2017: Inconsistent Line Endings Visual Studio Community 2017 - Stack Overflow