How do I fix stack frames/what are stack frames exactly?

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

My debugger has been showing stack frames. I’m quite unsure how to fix it? And I’m also pretty unsure what the exact definition is and why they appear?

It says:

0- func change_room
1- func initialize(starting_room)
2- func _ready

It also says "invalid get index ‘exits’ (on base: “Nil”).

I’ve been trying to fix this on my own for some time but I’m stuck. I feel like it’s a pretty simple problem, but it’s kinda hard when you’re new to programming.

:bust_in_silhouette: Reply From: SteveSmith

Stack frames are the methods that Godot is going through to run your code. In your example, _ready() has called initialize() which has called changeroom(). Since changeroom() is at the top, that’s the current method being run, and is where the error is.

As for the actual cause of the error, I can’t answer that without seeing the code.