Project Zomboid

Project Zomboid

[B42] Home Inventory Improved
BUG: Context Menu not working for me
When I hover over an item in my inventory, the context menu don't show up and this exception is thrown:

STACK TRACE ----------------------------------------- function: addCollectedAmountTooltip -- file: Tooltip.lua line # 14 | MOD: [B42] Home Inventory Improved function: trigger -- file: LuaEvent.lua line # 79 | MOD: Starlit Library function: DoTooltip -- file: InventoryUI.lua line # 36 | MOD: Starlit Library function: render -- file: ISToolTipInv.lua line # 80 | Vanilla function: render -- file: InventoryUI.lua line # 82 | MOD: Starlit Library function: render -- file: --EMU_Event_BeforeInventoryTooltipDisplay.lua line # 27 | MOD: Eggon's Modding Utils B42+ ERROR: General f:217907, t:1752806953664> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: SearchMethod of non-table: null at KahluaThread.tableget(KahluaThread.java:1667). Stack trace: se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1667) se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:479) se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:173) se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1963) se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1805) se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:38) zombie.ui.UIElement.render(UIElement.java:2005) zombie.ui.UIManager.render(UIManager.java:410) zombie.gameStates.IngameState.renderFrameUI(IngameState.java:1331) zombie.gameStates.IngameState.renderframeui(IngameState.java:1317) zombie.gameStates.IngameState.renderInternal(IngameState.java:1456) zombie.gameStates.IngameState.render(IngameState.java:1406) zombie.gameStates.GameStateMachine.render(GameStateMachine.java:28) zombie.GameWindow.renderInternal(GameWindow.java:468) zombie.GameWindow.frameStep(GameWindow.java:940) zombie.GameWindow.mainThreadStep(GameWindow.java:642) zombie.MainThread.mainLoop(MainThread.java:76) java.base/java.lang.Thread.run(Unknown Source)

The error in the code seems to be the `if O.SearchMethod() ~= "ShowCount"` line in line #14.

I don't know enough about Lua but I temporarily fixed it on my end by adding this line in the `addCollectedAmountTooltip` function:

if O == nil then return end
< >
Showing 1-2 of 2 comments
Sam  [developer] 18 Jul @ 12:36am 
That error was most likely caused by Tooltip.lua being loaded before Options.lua, so O wasn't loaded and still had a nil value. It should be fixed as of version 0.6.1 now. Please update the mod and feel free to tell me if you encounter any other bugs or errors.

Anyway, thanks for the bug report!
Asartalo 18 Jul @ 4:14pm 
Originally posted by Sam:
That error was most likely caused by Tooltip.lua being loaded before Options.lua, so O wasn't loaded and still had a nil value. It should be fixed as of version 0.6.1 now. Please update the mod and feel free to tell me if you encounter any other bugs or errors.

Anyway, thanks for the bug report!

Yup. Was able to get the update despite my spotty internet connection and I can now see the context menu. Thanks for the mod!
< >
Showing 1-2 of 2 comments
Per page: 1530 50