Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

I'm not familiar with Godot, but in line 7 you declare a local variable (=inside a method, the method _Ready in this case) starting with the keyword "public".  That won't work. Access modifiers (like public, private, protected) can only be used for variables defined at class level, not local variables. So your compiler assumes that this declaration is meant to be at class level, and you skipped the closing curly brace for the _Ready method.