Skip to content

Godot addon: Code parse error in project created in Godot 4.3 and upgraded to 4.8 #359

Closed

Description

@DarthWeber19

Installed Version 0.26.0 via Godot Asset Store

After Install the following Error occurs:

ERROR: res://addons/GDQuest_GDScript_formatter/plugin.gd:268 - Parse Error: Invalid argument for "set_setting_state()" function: argument 1 should be "Settings" but is "QuickSetupWindow.Settings"

The Error lives here:

func _update_quick_setup_settings_display() -> void:
	for setting: QuickSetupWindow.Settings in [QuickSetupWindow.Settings.FORMAT_ON_SAVE, QuickSetupWindow.Settings.LINT_ON_SAVE]:
		var state = get_editor_setting(_get_quick_setup_setting_name(setting))
		quick_setup_window.set_setting_state(setting, state)

Activity

  1. NathanLovato commented on Sep 22, 2026

    @NathanLovato
    Contributor

    I'll test when I can but if it works in 4.7 and not in 4.8 this would perhaps be an issue in the development version.

  2. DarthWeber19 commented on Sep 22, 2026

    @DarthWeber19
    Author

    Just checked with Godot 4.7.2

    The Error comes up with 4.7.2 as well.

    Addon was installed fresh.

  3. DarthWeber19 commented on Sep 22, 2026

    @DarthWeber19
    Author

    AI tells me that there is a known parser limitation with enum type resolution across script boundaries in Godot 4.

    I hope that helps

  4. DarthWeber19 commented on Sep 22, 2026

    @DarthWeber19
    Author

    Checked older versions from the asset store.
    0.23.0 has the same issue. (Godot 4.7.2 as well as 4.8.dev.6)
    0.22.0 works fine.

  5. added theissue type on Sep 22, 2026
  6. NathanLovato commented on Sep 22, 2026

    @NathanLovato
    Contributor

    Thank you very much for testing and reporting your findings!

  7. NathanLovato commented on Sep 23, 2026

    @NathanLovato
    Contributor

    It's weird, on my end with 4.7.1 and 4.7.2, I get no errors. On this screenshot, you can see the code in question running in 4.8.dev6, and I tried also in 4.7.1 and 4.7.2.

    Image

    I will remove the type hint anyway and hope that it addresses the thing for you. Could the issue be platform specific?

  8. NathanLovato commented on Sep 23, 2026

    @NathanLovato
    Contributor

    On your end, could you please try updating the function to use this code, save the file, then restart Godot? To verify that it does address the issue for you (as I cannot reproduce the error on my end):

    func _update_quick_setup_settings_display() -> void:
    	for setting in [QuickSetupWindow.Settings.FORMAT_ON_SAVE, QuickSetupWindow.Settings.LINT_ON_SAVE]:
    		var state = get_editor_setting(_get_quick_setup_setting_name(setting))
    		quick_setup_window.set_setting_state(setting, state)

    You might need to disable the add on and re-enable it in the project settings to force this function to run again (I've also tested that in every version of Godot I have here).

  9. DarthWeber19 commented on Sep 23, 2026

    @DarthWeber19
    Author

    I will try and report back later today. I will check on my linux machine as well to check if it is a windows version issue.

  10. DarthWeber19 commented on Sep 23, 2026

    @DarthWeber19
    Author

    Okay I checked on a fresh and empty project. No Problems there. Not on Windows not on Linux.
    It seems my Project, which was created using 4.3 or 4.4 and just got updated all the time, or some other addon introduces the issue.

    For your fix. When getting rid of the type and formatting code I get another error: Int could not be cast to object, which makes sense because set_setting_state() expects a Settings Object and not an Int, even though it would internally be an int, right?.
    This Problem also only occurs in my old Project and not an new and empty project.
    Seems I broke something on my end.

  11. NathanLovato commented on Sep 25, 2026

    @NathanLovato
    Contributor

    Thank you very much for taking the time to test and report your findings.

    For you, as a workaround, I would recommend removing the code that loads and opens the quick setup window:

    In plugin.gd, all the lines that reference the quick_setup_window variable or the QuickSetupWindowScene constant.

    An easy way to do that would be to delete the editor folder in the add-on and then delete all the lines that raise errors in the plugin file as a result.

    One thing I recommend checking in your project is if you happen to have any project settings in the project.godot file that look like they could affect this behavior. Either deprecated settings or I don't know, maybe special warnings treated as errors? Having created a project in an older version of Godot should not change how the GDScript parser and type resolution behave.

  12. changed the title [-]Godot 4.8.dev6 Parse Error[/-] [+]Code parse error in project created in Godot 4.3 and upgraded to 4.8[/+] on Sep 25, 2026
  13. changed the title [-]Code parse error in project created in Godot 4.3 and upgraded to 4.8[/-] [+]Godot addon: Code parse error in project created in Godot 4.3 and upgraded to 4.8[/+] on Sep 25, 2026
  14. DarthWeber19 commented on Sep 25, 2026

    @DarthWeber19
    Author

    I will do that. Thank you very much. Keep up the great work. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions