Project Zomboid

Project Zomboid

Swap It
This topic has been locked
B42 - Error and no function on pressing number key to equip
Happens whether or not a swap would occur. Right clicking a weapon and equipping does not swap when possible.
errorMagnifier and Mod Update and Alert System are installed, enabled, and the mod order shows all three as green.

`attempted index: getOption of non-table: null
function: equipItem -- file: SwapIt Main.lua line # 111 | MOD: SwapIt
function: activateSlot -- file: SwapIt Main.lua line # 65 | MOD: SwapIt
function: onKeyPressed -- file: ISHotbar.lua line # 781 | Vanilla
java.lang.RuntimeException: attempted index: getOption of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1667)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:624)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:173)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1963)
at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1790)
at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
at zombie.Lua.Event.trigger(Event.java:81)
at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:315)
at zombie.input.GameKeyboard.update(GameKeyboard.java:65)
at zombie.GameProfiler.invokeAndMeasure(GameProfiler.java:176)
at zombie.GameWindow.logic(GameWindow.java:303)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:76)
at zombie.GameWindow.frameStep(GameWindow.java:917)
at zombie.GameWindow.run_ez(GameWindow.java:810)
at zombie.GameWindow.mainThread(GameWindow.java:610)
at java.base/java.lang.Thread.run(Unknown Source)
< >
Showing 1-5 of 5 comments
Chuckleberry Finn  [developer] 24 Dec, 2024 @ 5:34am 
I'll check it out thank you.
Chuckleberry Finn  [developer] 24 Dec, 2024 @ 6:31am 
Not sure how you're encountering this error. When you you go to the menu under options - do you see a mods menu?
Chuckleberry Finn  [developer] 24 Dec, 2024 @ 6:45am 
In the meantime I've updated it to use default values if options are not found.
(゚Д゚) 24 Dec, 2024 @ 11:21am 
It works now, thanks. No error when hitting a number key and the slot swaps when possible.
I should have mentioned I'm playing with the native Linux build. I am using steam-native and my default Java is java-23-openjdk. I really should have checked steam-runtime.

Mod options (Current version, but looked like this when erroring.)
(゚Д゚) 25 Dec, 2024 @ 12:58am 
Not sure if it's due to that workaround but I found a new problem.
Trying to swap while holding mouse 2 just empties the slot in question. No associated error.
Tried with steam-runtime and forced scout runtime, but it still happens.
Example clip[streamable.com]
< >
Showing 1-5 of 5 comments
Per page: 1530 50