Project Zomboid

Project Zomboid

Change Sandbox Options (by Star)
Bananaut 28. dec. 2024 kl. 7:50
error (b42 update)
`Callframe at: getKeyName
function: addModOptionsPanel -- file: MainOptions.lua line # 3596 | Vanilla
function: create -- file: MainOptions.lua line # 645 | Vanilla
function: instantiate -- file: MainScreen.lua line # 718 | Vanilla
function: instantiate -- file: ChangeSandboxSettingsByStarFix.lua line # 121 | MOD: Change Sandbox Options (by Star)
function: addToUIManager -- file: ISUIElement.lua line # 1138 | Vanilla
function: LoadMainScreenPanelInt -- file: MainScreen.lua line # 2149 | Vanilla
function: LoadMainScreenPanel -- file: MainScreen.lua line # 2058 | Vanilla
`








`java.lang.IllegalArgumentException
at jdk.internal.reflect.GeneratedMethodAccessor130.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at se.krka.kahlua.integration.expose.caller.MethodCaller.call(MethodCaller.java:62)
at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:211)
at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:201)
at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:192)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:988)
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:281)
at zombie.core.Core.ResetLua(Core.java:4893)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at se.krka.kahlua.integration.expose.caller.MethodCaller.call(MethodCaller.java:62)
at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:211)
at se.krka.kahlua.integration.expose.MultiLuaJavaInvoker.call(MultiLuaJavaInvoker.java:60)
at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:192)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:988)
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.pcallBoolean(KahluaThread.java:1902)
at se.krka.kahlua.integration.LuaCaller.protectedCallBoolean(LuaCaller.java:104)
at zombie.ui.UIElement.onMouseUp(UIElement.java:1626)
at zombie.ui.UIElement.onMouseUp(UIElement.java:1581)
at zombie.ui.UIElement.onMouseUp(UIElement.java:1581)
at zombie.ui.UIElement.onConsumeMouseButtonUp(UIElement.java:1688)
at zombie.ui.UIManager.updateMouseButtons(UIManager.java:873)
at zombie.ui.UIManager.update(UIManager.java:733)
at zombie.GameProfiler.invokeAndMeasure(GameProfiler.java:176)
at zombie.GameWindow.logic(GameWindow.java:319)
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)
`
Sidst redigeret af Bananaut; 28. dec. 2024 kl. 7:51
< >
Viser 1-7 af 7 kommentarer
star  [udvikler] 28. dec. 2024 kl. 15:59 
What mods do you have?
star  [udvikler] 28. dec. 2024 kl. 16:05 
Seems another mod causes this issue. See the text in the log file above "Callframe at: getKeyName".
Bananaut 28. dec. 2024 kl. 16:20 
Oprindeligt skrevet af star:
What mods do you have?

only this one and the error magnifier, but even if i turned off the error magnifier this error still pops up, tho its working fine
Marads~Yuuka 28. dec. 2024 kl. 19:29 
Can confirm I got the same error, as extra info I added the mod to an existing save.

Still the changes made with the sanbox option worked, so the error didn't prevent the mod from working.
SkyBlue 29. dec. 2024 kl. 23:53 
Oprindeligt skrevet af star:
Seems another mod causes this issue. See the text in the log file above "Callframe at: getKeyName".

ChangeSandboxSettingsByStarFix.lua 162 Line
change Keyboard.NONE -> Keyboard.KEY_NONE

Thanks for the mod update
Sidst redigeret af SkyBlue; 29. dec. 2024 kl. 23:54
in world settings someway here is doubled lines about shutdown and ur mod have 1 pair.
so settings in ur mod do not effect at already disabled electricity by one of another vanilla settings
https://imgur.com/a/Nk6XFVa
если что могу описать по-русски
QAstral 7. jan. kl. 11:46 
Issue is in the saved file %USERPROFILE%\Zomboid\Lua\ModOptions.ini
where your mod creates this line:
keybind|ChangeSandboxOptions|sandbox_options_hotkey|nil
instead of this one:
keybind|ChangeSandboxOptions|sandbox_options_hotkey|0

getKeyName is the function which vanilla MainOptions runs on line 3596, and it must have a value. Because your mod has stored nil value, then it fails with IllegalArgumentException.

So I think SkyBlue's tip will fix your mod. Thanks for update.
Sidst redigeret af QAstral; 7. jan. kl. 11:49
< >
Viser 1-7 af 7 kommentarer
Per side: 1530 50