Dialogue Manager Error

Godot Version

4.4

Question

Hey!
Recently I’ve been working on a project that involves Nathan Hoad’s Dialogue Manager plugin. After following his text bots with portraits video tutorial, I’ve started getting a specific error where the code for making the portrait appear is. The error says:
"balloon.gd:101 @ apply_dialogue_line(): String formatting error, not all arguments converted during string formatting.

	character_label.visible = not dialogue_line.character.is_empty()
	character_label.text = tr(dialogue_line.character, "dialogue")
	var portrait_path: String = "res://sprites/playersprites/wizardportrait.png" % dialogue_line.character.to_lower()
	if ResourceLoader.exists(portrait_path):
		wizard.texture = load(portrait_path)
	else:
		wizard.texture = null

This is the entire code block.

You have String = "body" % something. The error is telling you that nothing in body is using the value of something.

The whole % dialog_line.character.to_lower() bit looks like a copy/paste bug; maybe get rid of it.

This worked! Thank you so much. Your explanation of what the code actually means was also very helpful.

1 Like