Game breaks as soon as I press space

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By flamerunner

Please help.

My game, using code from a simple tutorial, (HeartBeast’s making a Godot Top-Down 2D Game), is broken down completely. I keep getting "emit_signal: Error calling method from signal ‘area_entered’: ‘Node2d(grass) _on_area2D_area_entered’:Method not found…

What do I do?

:bust_in_silhouette: Reply From: godot_dev_

I think the error message is telling you that your grass node (a Node2D) is expected to have a onarea2Dareaentered method, but when areaentered signal is being emitted, your grass node doesn’t have the function. Make sure the node you are connection to the areaentered signal is the grass node and the grass node has a script that implements the onarea2Dareaentered method. By the way, I think the signal has a _ but you didn’t correctly format it in the forum post

Thanks! This helped me and I fixed it. I was about to restart.

flamerunner | 2023-01-17 02:20