Invalid call to function 'bounce' in base 'KinematicBody2D ('. Expected 1 arguments.

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

so i followed a tutorial on yt and everything was working fine but then suddenly it wont run
im compleaty new to coding so idk what it is please help
enter image description here

enter image description here

:bust_in_silhouette: Reply From: SteveSmith

Just like the error says, bounce() takes and argument (the body to bounce). I can’t see where this function is defined though.

:bust_in_silhouette: Reply From: LeslieS

To me it looks doomed to endless loop:

func bounce(body): 

If you correct the code and give the body.bounce a body parameter, the function will call itself endlessly.