Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Please help me: Error "Invalid call. Nonexistent function 'get_database_reference' in base 'Nil'." #430

Unanswered
SuperCdat asked this question in Q&A
Discussion options

today, i'm learning to use realtime database in firebase, godot. but there's an error like this "Invalid call. Nonexistent function 'get_database_reference' in base 'Nil'.". Anyone know how to solve this please help me

You must be logged in to vote

Replies: 2 comments 4 replies

Comment options

You have to get the reference first. Sounds like you did not read the wiki. Please check the wiki for how to use the realtime database.

You must be logged in to vote
2 replies
Comment options

I just realized this page is written for 3.x. I'm not sure what version of Godot you're using. Let me know and if it's 4.x, I can update this page or make a new one accordingly: https://github.com/GodotNuts/GodotFirebase/wiki/Realtime-Database

Comment options

thank you for reply, i forgot this on github :D

Comment options

image
i am sure that i did every setup step by step, i filled all requirements in env file, set database rule to true, i gave up. Today i try it again but it make me disappointed again.

You must be logged in to vote
2 replies
Comment options

I see. The error you're getting is because it's made outside of ready. Declare it and set it this way:

var db_ref
func _ready():
 db_ref = what you had before
Comment options

Conversely, I believe you can declare the variable as you have it as onready and that should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /