• 2D
  • Invalid call. Nonexistent function 'is_in_gruop' in base 'Area2D (Cactus.gd)'.

I have created a game(Coin Dash from a book). There is a Area2D player node in the main scene. And also there are coins and obstacles as Area2D node. Both of the nodes has appropriate CollisionShape2D as their child. So in the main scene, I have implemented the signal on_Player_area_entered like this, Here my obstacle Area2D node is in group "obstacles" and coin Area2D node is in group "coins". The game runs. When I touch coins, the pickup works prefect. But when I touch obstacle with my player, the game pauses and the runtime error shows up like the image below, I have been trying to make my obstacles work for hours. But haven't become successful identifying what is causing the error to happen. Can you help?

Hi, You’ve spelt is_in_group wrong in your Cactus.gd script.

Oh! Thanks a lot. Kudos goes to all of you. I am very sorry for the silly mistake :)

@Deaton64 said: Hi, You’ve spelt is_in_group wrong in your Cactus.gd script.

Thanks a lot

You're welcome. My usual one is spelling false as flase. Walking away and coming back to it can also help. Double clicking on the error in the IDE Debugger should take you straight to the error.

Usually the debugger will tell you exactly what is wrong, so it's always good to read carefully. Also note, sometimes the real error could be on another line (usually the line before or the line after). If there is some sort of syntax error it's possible the debugger will say something else is wrong, like if you forget a ":" after an if statement or similar. So look carefully at those 3 lines and usually you can find it.

@Deaton64 said: You're welcome. My usual one is spelling false as flase. Walking away and coming back to it can also help. Double clicking on the error in the IDE Debugger should take you straight to the error.

As you can see in the image, there are three is_in_group() calls in the code. Double clicking took me to the first call on line 50. But it should take me to line 56. May be it's a bug in Godot. Someone should fix it.

It seems to have highlighted the line 55 actually. Which was the previous line to the erroneous one.