GDScript warning system

    You can configure warnings in the Project Settings under the section called Gdscript:

    Warning system project settings

    Warning system example

    Warning system example

    To ignore specific warnings in one file, insert a special comment of the form , or click on the ignore link to the right of the warning’s description. Godot will add a comment above the corresponding line and the code won’t trigger the corresponding warning anymore:

    Warning system ignore example

    You can also choose to ignore not just one but all warnings of a certain type in this file with . To ignore all warnings of all types in a file add the comment to it.

    Warnings won’t prevent the game from running, but you can turn them into errors if you’d like. This way your game won’t compile unless you fix all warnings. Head to the section of the Project Settings to turn on this option. Here’s the same file as the previous example with warnings as errors turned on:

    Warnings as errors