'Invalid get index '_room' (on base 'Dictionary')' error in Godot 4 #331
-
I was following the wiki, but i got an error when running codes below:
Am i doing anything wrong? how should i solve it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
For one, you shouldn't need to use get_data() in this fashion: when you get a database reference, that will get the data for you. You did not follow the wiki correctly, or the wiki is wrong maybe? Where does it say in the wiki to call get_data() like that? I don't see it anywhere on the page for the database. For two, you should be connecting to the |
Beta Was this translation helpful? Give feedback.
For one, you shouldn't need to use get_data() in this fashion: when you get a database reference, that will get the data for you. You did not follow the wiki correctly, or the wiki is wrong maybe? Where does it say in the wiki to call get_data() like that? I don't see it anywhere on the page for the database. For two, you should be connecting to the
new_data_update
signal on the reference and then getting your data back from the handler.