Skip to content

Used space character for indentation instead of tab as used before in the file protobuf_util.gd #71

@jeansorgemoel

Description

@jeansorgemoel

Hi,

On main branch, commit 3f65fcf, when I launch on godot 4.6, I received an error to load protobuf_util.

Error :

SCRIPT ERROR: Parse Error: Could not preload resource script "res://addons/protobuf/protobuf_util.gd".
          at: GDScript::reload (res://addons/protobuf/protobuf_ui_dock.gd:36)
SCRIPT ERROR: Parse Error: Could not resolve script "res://addons/protobuf/protobuf_util.gd".
          at: GDScript::reload (res://addons/protobuf/protobuf_ui_dock.gd:36)
ERROR: Failed to load script "res://addons/protobuf/protobuf_ui_dock.gd" with error "Parse error".
   at: load (modules/gdscript/gdscript.cpp:2907)
SCRIPT ERROR: Parse Error: Used space character for indentation instead of tab as used before in the file.
          at: GDScript::reload (res://addons/protobuf/protobuf_util.gd:35)
ERROR: Failed to load script "res://addons/protobuf/protobuf_util.gd" with error "Parse error".
   at: load (modules/gdscript/gdscript.cpp:2907)

We have an issue on file protobuf_util.gd, sometimes we have tabulation and sometimes we have space.

to solve that, you can apply this patch : (protobuf_util.patch)

diff --git a/addons/protobuf/protobuf_util.gd b/addons/protobuf/protobuf_util.gd
index e873153..462b24f 100644
--- a/addons/protobuf/protobuf_util.gd
+++ b/addons/protobuf/protobuf_util.gd
@@ -33,8 +33,8 @@ static func extract_dir(file_path):
 	var parts = file_path.split("/", false)
 	parts.remove_at(parts.size() - 1)
 	var path
-    if file_path.begins_with("//"):
-        path = "//"
+	if file_path.begins_with("//"):
+		path = "//"
 	elif file_path.begins_with("/"):
 		path = "/"
 	else:

command to apply patch :

patch -Np1 < protobuf_util.patch

Regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions