#I do not understand why my code is not working

11 messages · Page 1 of 1 (latest)

sly coral
#

If someone could explain why its not working that would be great 🙏

iron kraken
#

First, you should check the warnings in the debugger window after it crashed. Usually it has a lot of stuff in there that can be ignored but you never know.
Next, you could add a breakpoint ( click left of line number ) to the line 35 shoot(). Now you can use the debugger to go step by step/go into each line of code to see exactly where it'll crash. You will also have a live view of all variables and their content which can be very helpful.

sly coral
iron kraken
#

when your game encounters such a breakpoint during execution it will look like this

#

i marked the button panel you can use to step through your code line by line and see exactly what is happening

sly coral
#

I know which line is the problem I just dont know how to do it for Godot 4 (the tutorial I used was Godot 3)

#

This is what Im getting