See all glossary terms

Programming Error

A programing error is not the same as a programmer mistake.
A programming error is a message provided by the software running your code. In the case of GDScript, this is the "GDScript runtime", which is responsible for the execution of your code.
Receiving an error in the debug panel is not a bad thing; it's actually good news, for the most part. To have an error message at all means some programmer, somewhere, predicted a possibility of a problem, and wrote a message to help you fix it. The message isn't always very clear, but it's a start.
There are two type of programming errors:
  • Static errors: These are errors that can be detected in the editor, as you type. They are mostly syntax errors (writing code that does not follow the rules), semantic errors (when the code is formally correct, but doesn't make sense, like using a function that doesn't exist), or type errors (assigning a value with the wrong type). Static errors prevent your program from running.
  • Runtime errors, or runtime errors are errors that couldn't be detected in the editor, such as for example, assigning a value to a node that doesn't exist.
Runtime errors are much more cumbersome than static errors, because to discover them, you need to run the software. Certain errors that happen only in specific conditions might be very hard to find, and to reproduce.
For that reason, programmers often try to push as much work as they can to the static checker.
The most cumbersome error is a logical error: when you write code that runs, and doesn't crash, but doesn't do what you need it to. For example, using the wrong formula somewhere. These are much harder to detect and fix.

See Also

Related terms in the Glossary