You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempt to call function 'get_character_name' in base 'null instance' on a null instance. Invalid access to property or key 'resource_path' on a base object of type 'null instance'.
#2516
Open
rubatozis opened this issue
Jan 13, 2025
· 0 comments
Describe the bug
I'm not sure if it's a bug or if I'm being stupid but I'm trying to make a simple logic for loading the game upon pressing play on the menu and it keeps giving me this error: Attempt to call function 'get_character_name' in base 'null instance' on a null instance. Alternatively (see below) I get this other error instead: Invalid access to property or key 'resource_path' on a base object of type 'null instance'.
To Reproduce
From menu:
# PLAY/CONTINUE BUTTON
func _on_button_1_pressed() -> void:
get_tree().change_scene_to_file("res://scenes/game.tscn") # Leave menu and go to game scene
Then the game scene. This is pretty much copied from the docs:
func load_save_game_slot(slot_name: String) -> void:
if Dialogic.Save.has_slot(slot_name):
Dialogic.Save.load()
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
load_save_game_slot("Default")
But upon testing i get this error: Attempt to call function 'get_character_name' in base 'null instance' on a null instance.
Which points to this line of code: var container := dialogic.PortraitContainers.load_position_container(character.get_character_name())
Inside res://addons/dialogic/Modules/Character/subsystem_portraits.gd.
Expected behavior
For the save to load normally.
System (please complete the following information):
OS: Windows 10
Godot Version: 4.2.2
Dialogic Version: 2.0 Alpha 16
Solutions
Workaround
I have tried calling the timeline first:
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
Dialogic.start("test_timeline")
load_save_game_slot("Default")
Which gives me a different error of a similar kind: Invalid access to property or key 'resource_path' on a base object of type 'null instance'.
Which points to this line of code: dialogic.current_state_info['portraits'].erase(character.resource_path)
Inside res://addons/dialogic/Modules/Character/subsystem_portraits.gd.
This is most definitely my fault in some way but I am a brand new dev so... Don't really know what to do. Plz be patient.
The text was updated successfully, but these errors were encountered:
The problem
Describe the bug
I'm not sure if it's a bug or if I'm being stupid but I'm trying to make a simple logic for loading the game upon pressing play on the menu and it keeps giving me this error: Attempt to call function 'get_character_name' in base 'null instance' on a null instance. Alternatively (see below) I get this other error instead: Invalid access to property or key 'resource_path' on a base object of type 'null instance'.
To Reproduce
From menu:
Then the game scene. This is pretty much copied from the docs:
But upon testing i get this error: Attempt to call function 'get_character_name' in base 'null instance' on a null instance.
Which points to this line of code:
var container := dialogic.PortraitContainers.load_position_container(character.get_character_name())
Inside res://addons/dialogic/Modules/Character/subsystem_portraits.gd.
Expected behavior
For the save to load normally.
System (please complete the following information):
Solutions
Workaround
I have tried calling the timeline first:
Which gives me a different error of a similar kind:
Invalid access to property or key 'resource_path' on a base object of type 'null instance'.
Which points to this line of code:
dialogic.current_state_info['portraits'].erase(character.resource_path)
Inside res://addons/dialogic/Modules/Character/subsystem_portraits.gd.
This is most definitely my fault in some way but I am a brand new dev so... Don't really know what to do. Plz be patient.
The text was updated successfully, but these errors were encountered: