Well yeah, when an error is “somewhere else” and we don’t know exactly where - that’s called a bug. And the process of finding out where it is - that’s called debugging
Welcome to programming!
@normalized
Because I’ve seen error output that indicates using the wrong type correctly, something like “you are using float instead of int in a_script.gd” so I thought it would be easy error to catch. But then again what do I know..
That’s why we have different names for those two major categories: straightforward errors and bugs. Errors are errors that are obvious, and bugs are errors that are not obvious due to complexity of your program.
For example, if you forget to initialize a reference variable, the actual problem is at the place where that initialization is supposed to happen, however the effect of that error can show in a completely different place - where you first need to use that reference, making it seem the error is “random”. Because of this, bugs in a complex program can sometimes be difficult and time consuming to find.
In your specific case the error message means that attack_start_timer wasn’t initialized. Some other code was supposed to initialize it, but it didn’t for some reason. So you need to follow that clue and find out why it isn’t initialized as you’re expecting it to be. It requires a bit of detective work so to speak.