The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes


I often got these kind of yellow error when testin my projects:

'The argument 'body' is never used in the function 'onArea2Dbodyentered''.

They don't seem to really affect them, are they?

in Engine by (326 points)

3 Answers

+1 vote
Best answer

I wouldn't recommend that you blindly ignore warnings. They are there to indicate possible issues with your code. As long as you understand why a given warning is being issued, you can make an informed decision regarding whether it's important to you or not.

The specific warning you mention is just telling you that your onArea2Dbodyentered function has an input argument (body, which is the body you collided with) that you're not using in the function. That's not really a problem if you don't need it for anything. So, again, just understand the warnings and make appropriate decisions.

You can tune the various warnings issued by Godot in the Project Settings. Specifically Project Settings | Debug |GdScript. There you can disable all or specific warnings and errors, though I wouldn't recommend you do that.

For details, see:

Additionally, you can disable specific warning/errors in a given source code file using a number of directives. Rather than going into the details, here's a link to a relevant discussion:

by (22,674 points)
edited by

I see, could a lot of them leads to big issues or slowed loading?

–2 votes

If the errors are yellow you shouldn't worry about them.

by (49 points)
+1 vote

You can add an underscore in front of any argument (_body) to make these errors go away. As far as I know they don't hurt, they're just info.

You can also click on Project -> Project Settings -> Debug -> GdScript and disable "Unused Argument" to disable these messages for your entire project.

by (30 points)

Yes, you could also toggle them at the bottom of the script, but i'll keep them and try to remove them in time.

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.