Fixing the null error

Godot Version

4.6.1

Question

Hello im a noob in godot. I'm trying to create a simple login system with database with SQLite plugin. I created database in a parent node and right now I'm trying to get access of it in child node

Parent:

Child:

When I’m trying to use variable db I get error “cannot call method on a null value”. So I printed it and yes it’s null.

I genuinely don’t know how to fix it. Pls help

Parent nodes only call _ready when all of their children are done with _ready, so the database is not created yet.


Make sure to paste code instead of screenshots

1 Like