Compile error

I started making a trial game to see how unity works. I tried putting a script on a character but this is what’s, Please fix compile errors before creating new script components.
Could someone please tell me how to fix this.
I linked the script.

6707377–770599–2dmove.cs (653 Bytes)

You cannot have a class or identifier that starts with a number. So 2dmove is invalid because it starts with the number 2.
You are going to have to change your class and the script file name.

i changed the name to move 2d but i don’t know how to change the class

this is code now

6708496–770797–move2d.cs (478 Bytes)

Why on earth did you think that you should change the class definition line to this:

public class class1 move2d : MonoBehaviour{

If you need to change the class name of 2dmove then you should have just changed the 2dmove to move2d to match the file name.
Why did you think you should add class1 to that line in the script?
That line should simply have been:

public class move2d : MonoBehaviour{

That’s it, all done.
I would suggest that you read up on C# and follow some tutorials before proceeding. These will benefit you in the long run.
I would also recommend not attaching script files to your post, and instead just copy/paste the code into your post using code tags to format it properly (you can look up how to use code tags in the forum).[/icode]

Hi @Viroupx_Spock04r ,
There is a great beginner gameplay scripting tutorial series on Unity Learn that I always recommend

It will walk you through the basics of scripting in C# in the context of Unity game development.