Project Zomboid

Project Zomboid

Change Sandbox Options (by Star)
Bananaut 2024 年 12 月 28 日 上午 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)
`
最后由 Bananaut 编辑于; 2024 年 12 月 28 日 上午 7:51
< >
正在显示第 1 - 7 条,共 7 条留言
star  [开发者] 2024 年 12 月 28 日 下午 3:59 
What mods do you have?
star  [开发者] 2024 年 12 月 28 日 下午 4:05 
Seems another mod causes this issue. See the text in the log file above "Callframe at: getKeyName".
Bananaut 2024 年 12 月 28 日 下午 4:20 
引用自 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 2024 年 12 月 28 日 下午 7: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 2024 年 12 月 29 日 下午 11:53 
引用自 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
最后由 SkyBlue 编辑于; 2024 年 12 月 29 日 下午 11: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 1 月 7 日 上午 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.
最后由 QAstral 编辑于; 1 月 7 日 上午 11:49
< >
正在显示第 1 - 7 条,共 7 条留言
每页显示数: 1530 50