GithubHelp home page GithubHelp logo

Many Dialogic errors such as "Parse Error: Could not resolve class" and "Invalid call. Nonexistent function" on editor start, Dialogic panel Character selection and edit about dialogic HOT 4 OPEN

hsandt avatar hsandt commented on June 10, 2024
Many Dialogic errors such as "Parse Error: Could not resolve class" and "Invalid call. Nonexistent function" on editor start, Dialogic panel Character selection and edit

from dialogic.

Comments (4)

hsandt avatar hsandt commented on June 10, 2024

I got a more consistent repro during project edit, not on start, with similar but a slightly different set of errors:

Open Dialogic panel and select character:

res://addons/dialogic/Editor/CharacterEditor/char_edit_section_portraits.gd:51 - Invalid call. Nonexistent function 'set_value' in base 'HBoxContainer (field_vector2.gd)'.

Edit Display Name and try to save:

res://addons/dialogic/Editor/CharacterEditor/char_edit_section_portraits.gd:66 - Invalid get index 'current_value' (on base: 'HBoxContainer (field_vector2.gd)').
res://addons/dialogic/Modules/Text/character_settings/character_moods_settings.gd:36 - Invalid get index 'custom_info' (on base: 'Nil').
res://addons/dialogic/Modules/Style/character_settings_style.gd:23 - Invalid get index 'custom_info' (on base: 'Nil').
res://addons/dialogic/Editor/CharacterEditor/character_editor.gd:114 - Invalid get index 'resource_path' (on base: 'Nil').

It is possible that one of the errors prevent immediate character saving, therefore causing #2227

from dialogic.

hsandt avatar hsandt commented on June 10, 2024

Very weird. When adding a new character portrait (the entry, not the picture), I got a similar issue:

res://addons/dialogic/Editor/CharacterEditor/char_edit_p_section_layout.gd:16 - Invalid call. Nonexistent function 'set_value' in base 'HBoxContainer (field_vector2.gd)'.

and noticed that field_vector2.gd defines a _set_value with initial underscore indeed, not set_value. So I fixed the call in char_edit_p_section_layout.gd from:

%PortraitOffset._set_value(data.get('offset', Vector2()))

to:

%PortraitOffset.set_value(data.get('offset', Vector2()))

but then I got:

res://addons/dialogic/Editor/CharacterEditor/char_edit_p_section_layout.gd:16 - Invalid call. Nonexistent function '_set_value' in base 'HBoxContainer (field_vector2.gd)'.

which I don't understand at all.

from dialogic.

hsandt avatar hsandt commented on June 10, 2024

Before, I also had an error in res://addons/dialogic/Editor/CharacterEditor/character_editor_portrait_tree.gd when creating a new Portrait entry for a character:

res://addons/dialogic/Editor/CharacterEditor/character_editor_portrait_tree.gd:32 - Invalid get index 'default_portrait' (on base: 'Nil').
res://addons/dialogic/Editor/CharacterEditor/character_editor.gd:345 - Cannot call method 'set_meta' on a null value.

But this one was easy to avoid, just checking for null:

func add_portrait_item(portrait_name: String, portrait_data: Dictionary, parent_item: TreeItem, previous_name := "") -> TreeItem:
	var item: TreeItem = %PortraitTree.create_item(parent_item)
	item.set_text(0, portrait_name)
	item.set_metadata(0, portrait_data)
	if previous_name.is_empty():
		item.set_meta('previous_name', get_full_item_name(item))
	else:
		item.set_meta('previous_name', previous_name)
	# LOCAL FIX by hsandt: check for null current_resource
	# This avoids errors:
	# res://addons/dialogic/Editor/CharacterEditor/character_editor_portrait_tree.gd:32 - Invalid get index 'default_portrait' (on base: 'Nil').
  	# res://addons/dialogic/Editor/CharacterEditor/character_editor.gd:345 - Cannot call method 'set_meta' on a null value.
	if editor.current_resource:
		if portrait_name == editor.current_resource.default_portrait:
			item.add_button(0, get_theme_icon('Favorites', 'EditorIcons'), 2, true, 'Default')
	return item

from dialogic.

hsandt avatar hsandt commented on June 10, 2024

And another error I don't understand at all, when refreshing the portrait image field:

			print("current_portrait_data: ", current_portrait_data)
			var mirror: bool = current_portrait_data.get('mirror', false) != current_resource.mirror

res://addons/dialogic/Editor/CharacterEditor/character_editor.gd:577 - Invalid get index 'mirror' (on base: 'Nil').
current_portrait_data: { "scene": "", "export_overrides": { "image": """" }, "scale": 1, "offset": (0, 0), "mirror": false }

I debug printed the current_portrait_data (note that print appears after error due to how streams are handled), and I do see mirror is there. And clearly the variable is not null.

Despite all these @tool errors I managed to make portraits work with the Premade Style layer "Textbox with Portrait", so I suppose I can go on with development. The biggest issue was character asset not saving properly, I had to re-add the Portrait once or twice to finally save it. But it seems related to another issue #2227

For now I'll just ignore further tool errors and focus on actual runtime.

from dialogic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.