关于数据库的错误信息

关于数据库,出现了以下错误信息:

ERROR: 无法创建文件 ‘res://WeaponSet.string/Name.translation’。
ERROR: 无法打开文件 ‘res://WeaponSet.string/Name.translation’。
ERROR: 无法创建文件 ‘res://WeaponSet.int/MainWeapon.translation’。
ERROR: 无法打开文件 ‘res://WeaponSet.int/MainWeapon.translation’。
ERROR: 无法创建文件 ‘res://WeaponSet.int/SubWeapon1.translation’。
ERROR: 无法打开文件 ‘res://WeaponSet.int/SubWeapon1.translation’。
ERROR: 无法创建文件 ‘res://WeaponSet.int/SubWeapon2.translation’。
ERROR: 无法打开文件 ‘res://WeaponSet.int/SubWeapon2.translation’。
ERROR: 无法创建文件 ‘res://WeaponSet.int/SpecialWeapon.translation’。
ERROR: 无法打开文件 ‘res://WeaponSet.int/SpecialWeapon.translation’。
ERROR: 无法创建文件 ‘res://WeaponSet.int/SpChargeSpeed.translation’。
ERROR: 无法打开文件 ‘res://WeaponSet.int/SpChargeSpeed.translation’。
ERROR: 无法创建文件 ‘res://WeaponSet.image/Graphic.translation’。
ERROR: 无法打开文件 ‘res://WeaponSet.image/Graphic.translation’。
ERROR: 无法创建文件 ‘res://WeaponSet.image/Bullet.translation’。
ERROR: 无法打开文件 ‘res://WeaponSet.image/Bullet.translation’。
ERROR: 无法创建文件 ‘res://WeaponSet.image/Graphic2.translation’。
ERROR: 无法打开文件 ‘res://WeaponSet.image/Graphic2.translation’。
ERROR: core\\io\\file_access.cpp:857 - 条件 “f.is_null()” 为真。继续执行。
ERROR: core\\io\\file_access.cpp:857 - 条件 “f.is_null()” 为真。继续执行。
ERROR: core\\io\\file_access.cpp:857 - 条件 “f.is_null()” 为真。继续执行。
ERROR: core\\io\\file_access.cpp:857 - 条件 “f.is_null()” 为真。继续执行。
ERROR: core\\io\\file_access.cpp:857 - 条件 “f.is_null()” 为真。继续执行。
ERROR: core\\io\\file_access.cpp:857 - 条件 “f.is_null()” 为真。继续执行。
ERROR: core\\io\\file_access.cpp:857 - 条件 “f.is_null()” 为真。继续执行。
ERROR: core\\io\\file_access.cpp:857 - 条件 “f.is_null()” 为真。继续执行。
ERROR: core\\io\\file_access.cpp:857 - 条件 “f.is_null()” 为真。继续执行。

这些错误仅作为日志输出,对程序运行没有影响,但我不清楚具体是什么原因导致的。

另外,将项目导出并在其他项目中加载时,一切正常,没有任何问题。

从错误信息来看,似乎是尝试在 WeaponSet.string、WeaponSet.int、WeaponSet.image 文件夹中创建 Name 的翻译数据时失败了……

你的项目中是否已经设置了多语言支持?

请问可以分享一下项目文件吗?

这样可以吗?
项目启动和测试游玩时都会出现。

1 个赞

确实会出现,我会在开发中共享。

1 个赞

已进行调查。
结论是,这是基础引擎 Godot 的规格所致。
原因是数据库的 CSV 数据输出路径位于项目文件夹内。

在 Godot 中,CSV 文件被视为翻译文件。
系统尝试将输出的 CSV 数据作为翻译文件处理,但由于该数据来自数据库,无法作为翻译文件正常运行,从而导致错误。

解决方法是:
请将数据库输入/输出用的 CSV 数据输出路径从项目文件夹内更改为 PC 上的其他任意位置,这样问题即可解决。

1 个赞

感谢您的调查!
看来问题可以解决了!