Parser Error How To Fix?

Godot Version

4.6

Question

Dont know if this is where i ask this but here we go :slight_smile:

so i was working with the dialogue manager (the reason im not raising this as a bug with them is because this has also happened with non-addon code :3) and i got the error “Parser Error: Invalid argument for “show_dialogue_balloon()” function: argument 1 should be “DialogueResource” but is “String”.” With this code:

extends Area3D

@export var dialouge_resource = DialogueResource 



func _on_area_entered(area: Area3D) -> void:
	if Input.is_action_just_pressed("interact"):
		DialogueManager.show_dialogue_balloon("DFD")

(DFD is just the name for one of my charecters first dialogue, i dont know if its an actual acroynym for something bad)

But then i changed the code to this:

extends Area3D

@export var dialouge_resource = DialogueResource 



func _on_area_entered(area: Area3D) -> void:
	if Input.is_action_just_pressed("interact"):
		DialogueManager.show_dialogue_balloon("start1")

And still got the same error. Any tips?

As the error says, show_dialogue_balloon() expects a DialogueResource but you are passing a String ("DFD" and "start1"). I suggest you browse the docs:

Thanks! That helped a lot!