1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #105345 from Zylann/gdextension_print_version

Print Godot version when an extension is found to be incompatible
This commit is contained in:
Thaddeus Crews
2025-06-04 10:34:24 -05:00

View File

@@ -313,7 +313,9 @@ Error GDExtensionLibraryLoader::parse_gdextension_file(const String &p_path) {
compatible = GODOT_VERSION_PATCH >= compatibility_minimum[2]; compatible = GODOT_VERSION_PATCH >= compatibility_minimum[2];
} }
if (!compatible) { 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; return ERR_INVALID_DATA;
} }
@@ -345,7 +347,8 @@ Error GDExtensionLibraryLoader::parse_gdextension_file(const String &p_path) {
#endif #endif
if (!compatible) { 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; return ERR_INVALID_DATA;
} }
} }