Need help with coins.

Godot Version

Godot 4.7

Question

I need help with my code cuz it’s saying that The parameter “body” is never used in the function “_on_body_entered()”. If this is intended, prefix it with an underscore: “_body”.

func _on_body_entered(body: Node2D) -> void:
	pass # Replace with function body.

Please check Posting guidelines in #Help channel

mb, sorry

Usually it’s followed by check what is body and if true then executed your setter(func).

Such as code here

It checking body , setting target, animating and in animation end execute collecting.

This is a warning from the script editor that you have declared a function parameter but have not yet used it within that function. This is not unusual with signal functions as you are obliged to follow the parameter template but you might not need all the parameters so GDScript acknowledges prefixing the parameter with an underscore as a way of ignoring this script/syntax check.

There are a whole bunch of these sort of checks you can configure in Project Settings/Debug/GDScript, you can choose between Ignore, Warn and Error.

You will get mixed opinions on whether they are useful warning messages or whether the editor is nagging you too much, personally I am happy to get any help I can from the editor.