[HELP] I'm getting an error Unexpected symbol `(', expecting `identifier'

Unity is telling me to fix all compiler errors and giving me this - Assets/TextController.cs(15,38): error CS1525: Unexpected symbol (', expectingidentifier’ - when I try running it.

Here’s my code:
https://pastebin.com/3muqk0gF

And a screenshot:

Hey Damian!

I checked Unity documentation and it looks like you should change “(Input.GetKeyDown.(KeyCode.Space))” in your code to “(Input.GetKeyDown(KeyCode.Space))”. Below is the screenshot of code sample I found in documentation.

I hope it helps.

1 Like

As Artem said, you have a dot after GetKeyDown that should not be here :slight_smile:

Thank you Artem!

1 Like

Privacy & Terms