watching a tutorial for fps making
link: https://www.youtube.com/watch?v=VtJXqRsFezY
its stating I’m calling a nonexistent function “connect” in base signal
problem code line will be bolded/line 12
code:
class_name StateMachine
extends Node
@export var CURRENT_STATE : State
var states: Dictionary = {}
func _ready():
for child in get_children():
if child is State:
states[child.name] = child
–child.transition.conncet(on_child_transition)–
else:
push_warning(“StateMachine contains incompatible child node”)
“Conncet” is spelled wrong, ironically you spelled it correctly typing out the error message.
By crashes do you mean it opens a stack trace? This will freeze the game so you can inspect the game’s state at the point of failure using the debug panel. It is not a crash, but if you try to close the window most operating systems will treat it as frozen.