0 votes

If in two different scripts we define two functions with the same name, we are caught with a "misplaced func" error, even if we define the two scripts as classes. Is it possible to have different scripts with functions sharing the same name?

Godot version 3.3 stable
in Engine by (15 points)

1 Answer

+2 votes
Best answer

Yes, you can have functions with the same name.

"misplaced func" isn't an error because of the name, it means you wrote func where it doesn't belong.

by (21,718 points)
selected by

Identation error. Still getting used to python x)

No problem. But remember, GDScript is not Python.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.