@PetarD05 Since you didn’t actually post a question, I’m assuming you’re having trouble figuring out how to fix that last error. Let me walk you through it.
“Unexpected symbol” means the compiler encountered something that surprised it. So let’s say in my made up language, all sentences must be structured like “[NOUN] [VERB] [ADVERB].” If I try typing out:
The compiler will fail at “home” because it expects to find an adverb and instead is encountering a noun. In your case, the compiler is telling you it encountered the word “void” when it didn’t expect to see it.
‘void’ is a keyword that indicated you’re declaring a method with no return type. Methods can only be declared at the root level of classes; not inside other methods, and not outside of a class. So that means if the compiler has an issue with the ‘void’ declaration, you’re probably violating one of those rules. (Alternatively, it could still be because of a missing semicolon, but that’s not the case here.)
You didn’t paste your whole script ( sharing code with code tags is better than posting screenshots), so I can only assume, but things don’t look correct to me right before your OnTriggerEnter method. It looks like there’s one too many closing curly brace. You should go through and see how they line up and make sure your method is being declared in the correct place and that you’re not declaring it outside the class definition.
I can also see that your code isn’t formatted correctly as far as indent levels go. While indenting is all optional, formatting your code correctly helps make these errors more obvious.