我正在尝试将fs17转换为fs19鼠标操纵模块。
控制台出现:
register.lua:11: attempt to call field 'registerSpecialization' (a nil value)
代码如下:
SpecializationUtil.registerSpecialization("ControlMouse", "ControlMouse", g_currentModDirectory.."ControlMouse.lua")
ControlMouse_Register = {};
我试图通过以下方式解决它:
if SpecializationUtil.specializations["ControlMouse"] == nil then
SpecializationUtil.registerSpecialization("ControlMouse", "ControlMouse", g_currentModDirectory.."ControlMouse.lua");
addSpecialization.isLoaded = false;
else
-- print(" mod controlmouse is loaded!");
end;
此后显示如下:
/mods/ControlMouse/register.lua:1: attempt to index field 'specializations' (a nil value)
感谢您的解决方案。 如果您愿意,我会向您发送完整的代码
答案 0 :(得分:0)
尝试检查SpecializationUtil:
ngOnDestroy