I need help fixing this and don't know how.,Hello Unity I am new to it and today I tried to write a script, but when I pressed play it came with the message "All compiler errors have to be fixed

So I’m new to Unity and was writing a script off of an hopefully updated tutorial, so I built the script and then went to the game screen and pressed play, but then the screen came up with the message: All compiler errors must be fixed before you can enter play mode! So fun to watch,not. Anyway then I went over to the script and saw a message saying "Unexpected symbol ‘end-of-file’, oh and heres the script:`

{GetComponet<Renderer> ().material.color = Color.blue;

What do I do?


If you are using c# (Which is a programming language) Remember that some symbols can only be used. The autocorrect options that appear, if you click on it thinking it is easier, TRUST ME! its not. It puts some useless stuff on your file and causes problems like this. C# IS ALSO CAPITAL SENSITIVE! if you do not put capitals in the right space, then this can also happen. You can try resolving this problem by doing one of the following

-Adding a line between “{” for example

Line 1- {
Line 2- GetComponet ().material.color = Color.blue;
Line 3- }

-Removing The “< & >” keys from the script. This can be symbols that C# does not like

-Making sure that you end the script with “}” (PUT AT THE VERY, VERY END!)

-Making sure that any information have to go between ()