I have recently installed a mod (put its folder in the '\PAYDAY 2\mods' directory) after previously disabling it, and then removing it from the 'mods' folder afterwards (prior to version r14).
After I've installed the mod, when I go to Options » Lua Mods, the game crashes with crash.txt log:
Application has crashed: C++ exception
mods/base/lua/MenuManager.lua:155: table index is nil
I've looked at that file, and it's this part of function ModMenuCreator.create_lua_mods_menu:
if not _hooks[ hook ] then
hooks_str = hooks_str .. " " .. tostring(hook) .. "\n"
_hooks[ hook ] = true
end
It crashes in the _hooks[ hook ] = true line. I fixed it by modifying the code above to:
if hook and not _hooks[ hook ] then -- added check for 'hook' variable
hooks_str = hooks_str .. " " .. tostring(hook) .. "\n"
_hooks[ hook ] = true
end
... which allowed me to access Options » Lua Mods without crashing.
I have recently installed a mod (put its folder in the '\PAYDAY 2\mods' directory) after previously disabling it, and then removing it from the 'mods' folder afterwards (prior to version r14).
After I've installed the mod, when I go to Options » Lua Mods, the game crashes with crash.txt log:
I've looked at that file, and it's this part of function ModMenuCreator.create_lua_mods_menu:
It crashes in the
_hooks[ hook ] = true
line. I fixed it by modifying the code above to:... which allowed me to access Options » Lua Mods without crashing.