Explorar o código

Merge pull request #105345 from Zylann/gdextension_print_version

Print Godot version when an extension is found to be incompatible
Thaddeus Crews hai 3 meses
pai
achega
cc4bbf78fb
Modificáronse 1 ficheiros con 5 adicións e 2 borrados
  1. 5 2
      core/extension/gdextension_library_loader.cpp

+ 5 - 2
core/extension/gdextension_library_loader.cpp

@@ -313,7 +313,9 @@ Error GDExtensionLibraryLoader::parse_gdextension_file(const String &p_path) {
 		compatible = GODOT_VERSION_PATCH >= compatibility_minimum[2];
 	}
 	if (!compatible) {
-		ERR_PRINT(vformat("GDExtension only compatible with Godot version %d.%d.%d or later: %s", compatibility_minimum[0], compatibility_minimum[1], compatibility_minimum[2], p_path));
+		ERR_PRINT(vformat("GDExtension only compatible with Godot version %d.%d.%d or later: %s, but your Godot version is %d.%d.%d",
+				compatibility_minimum[0], compatibility_minimum[1], compatibility_minimum[2], p_path,
+				GODOT_VERSION_MAJOR, GODOT_VERSION_MINOR, GODOT_VERSION_PATCH));
 		return ERR_INVALID_DATA;
 	}
 
@@ -345,7 +347,8 @@ Error GDExtensionLibraryLoader::parse_gdextension_file(const String &p_path) {
 #endif
 
 		if (!compatible) {
-			ERR_PRINT(vformat("GDExtension only compatible with Godot version %s or earlier: %s", compat_string, p_path));
+			ERR_PRINT(vformat("GDExtension only compatible with Godot version %s or earlier: %s, but your Godot version is %d.%d.%d",
+					compat_string, p_path, GODOT_VERSION_MAJOR, GODOT_VERSION_MINOR, GODOT_VERSION_PATCH));
 			return ERR_INVALID_DATA;
 		}
 	}