The argument 'area' is never used in the function '_on_Area2D_area_exited' . why is this error popping up?

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

I used Area_entered signal for checking collisions for the enemy with area2d node , but this error shows up. However, it does not make it crash or anything…
pls answer …

W 0:00:00.901 The argument ‘area’ is never used in the function ‘_on_Area2D_area_exited’. If this is intended, prefix it with an underscore: ‘_area’
:bust_in_silhouette: Reply From: kidscancode

That is not an error, it is a warning.

It means exactly what it says. You have a function _on_Area2D_area_exited() which has an argument area and you’re not using that parameter.

If you’re fine with this, change it to _area and you won’t see the warning any more.


ETERNUS_GAMING | 2021-09-08 05:43