Hi, i have a problem, i have a button scene and a button script. The button is connected in the button script. I have a main scene with a main script and in the script i do:
onready var button = preload("res://button.tscn").instance()
func _ready():
button.duplicate(1)
button.global_position = # a random position (the position is not the problem)
self.add_child(button)
the script works perfect it duplicate the button and set it on the perfect position but if i run the game i get a error the game dont stop but if i will press the button i get this error:
E 0: 00: 04.882 emit_signal: Error calling method from signal 'pressed': 'Button (object.gd) :: _ on_Button_pressed ()': Method not found ..
<C ++ source code> core / object.cpp: 1260 @ emit_signal ()
and i dont no what i can do.
please help me.