Post the properly formatted code in its entirety. Make sure it’s the exact version that caused the error. Check that you don’t have multiple versions of the same scripts and that a “wrong/old” version is not attached to the node.
Post the screenshot of your scene tree.
Post the screenshot of your whole editor window showing the error.
Post the exact error message and specify the exact line that caused it.