Yellow "errors" on signals not used in a script

Hello everyone! I am using 4.5.1

In my game I have a base script that has some signals that aren’t used in that script but are used in extensions of that script. The editor gives me yellow errors on these signals, and I would just like to know how to remove the yellow error without getting rid of the signal from that script and also without using it in that script just to “shut it up“ per say. Thank you for your help in advance.

@warning_ignore("unused_signal")
signal unused_signal

More on warning ignore annotations in the docs:

You can also set the ignore/warning/error level per category in project settings in Debug/GDScript.

1 Like

Thank you @normalized, that was extremely helpful!

1 Like

Also, in your editor, when you see those errors, you can select the file in the Script view, click the warning yellow signal. Besides each error is an Ignore link. Clicking that will add the code to ignore each warning for you.

Thank you for mentioning this feature, it sounds useful as well. unfortunately, I cannot see what you are talking about. could you show an example screenshot of that?

Never mind, lol. I just found out where you can do that! Thank you again for the help. If I were to ignore a signal that I didn’t intend to ignore, do you know where I could unignore it?

1 Like

You’re not ignoring the signal, just the warning. You can delete the line if you want, but it doesn’t hurt the code’s functionality if you leave it in.

1 Like