A rare error with connecting signals

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

I’m building a TD game with an enemySpawner which handles just that.

I’ve recently erased from enemies a “life_changed” signal which they all had. For some reason, the editor still tries to connect that signal when instanciating objects.

This error appears on line: “var enemy = tipo.enemy.instance()”, where “tipo” refers to the given dictionary. And tipo.enemy refers to the preload Scene within that dictionary.

Also: there used to be a “colorRect” representing life which got the signal and act on it. But for all ColorRects i’ve cleaned the .gd file so that shouldnt be a problem.

i have also checked the timeout function but it has no clue whatsoever.

If anyone could help me, i’ve ran out of ideas here.

E 0:00:07.175 connect: In Object of type ‘KinematicBody2D’: Attempt to connect nonexistent signal ‘life_changed’ to method ‘ColorRect._on_enemy_pedo_normal_life_changed’.
<Error de C++>Condition “!signal_is_valid” is true. Returned: ERR_INVALID_PARAMETER
<Fuente C++> core/object.cpp:1500 @ connect()
enemySpawner.gd:93 @ spawn()
enemySpawner.gd:153 @ _on_spreadTimer_timeout()

:bust_in_silhouette: Reply From: Inces

It sounds like You removed signal itself, but not connect() method. You must have forgotten about one ColorRect that still has this method. Perhaps there is some subclass, whose superclass tries to connect to it ?