Godot Version: 4.3
I’ve been hours with this.
So I’m working on a card game where I’m trying to switch from states (base, clicked, dragging…). I’m trying to create a Card State Machine, but I don’t know why it drops this error (Out of bounds get index ‘1’ (on base: ‘Dictionary’). I’ve searched for help online but nothing seems to work for me. If someone knows what am I doing wrong I would be very grateful.
Script: class_name CardStateMachineextends Node@export var initial_state: CardStat - Pastebin.com
Note: the line crashing is var new_state : CardState = states[to]