Godot Version
4.7.2
Question
I’m very new to Godot and to coding as a whole, and have been stuck on the same problem for days. Im trying to make a dialogue system, and am following a YouTube tutorial because I’m new, but I have this stupid error that I just cant fix.
Even when this is fixed, I’m sure there will be new problems, but any help would be great.
Code:
extends CanvasLayer
@export var b_group : ButtonGroup
var dia_choices : Dictionary
signal next_id(id: String)
func _ready() -> void:
b_group.pressed.connect(get_choice)
func set_choices(choices: Dictionary):
print(choices)
var index = 0
var buttons = b_group.get_buttons()
for c in choices.keys():
print(c)
buttons[index].text = c
index += 1
pass
func get_choice(b : Button):
print(b)
pass