Identifier "fardig" isn't declared in the current scope - but I dion't see how it isn't.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By tylowstar

Hi! I’m new to Godot / GDScript and unused to working with signals. I’m trying to use a custom signal “fardig”, but when I attempt to emit it isnide of a function, the error checker calls a foul.

Code follows:

extends AnimatedSprite
signal fardig

func thingymajig() -> void:
    # irrelevant code

The error checker highlights fardig.emit() and outputs “Identifier “fardig” isn’t declared in the current scope”. But I declared it at the top, didn’t I? For reference, some variables I’ve declared at the top work inside of the function just fine.

:bust_in_silhouette: Reply From: tylowstar

Nevermind, I hadn’t updated to 4.0 like I thought, so await didn’t exist lol.