Angry362 / Lifestyle-Mod-Project-Zomboid-

0 stars 0 forks source link

Bugs in Classic Guitar with Level 9 Music Skills #7

Closed kiraqxc closed 11 months ago

kiraqxc commented 11 months ago

1.About Music Skills and Classical Guitar Performance

2.In fact, the mod had been running well before, but it changed after my music skills reached level 9. If I carried the classical guitar on my back, I would not be able to continue playing music normally as before reaching level 9 (unless I only put it in my backpack), and error reports would constantly pop up. I tried to compare the electric guitar and keyboard guitar on my back, and the results showed that both were still able to play normally. I would like to ask if this issue is caused by an issue with mods, as I closed other mods and kept this for testing. The same issue still occurred when the music level reached level 9.

3.When the music level reaches level 9, carry the classic guitar on your back, right-click on the classic guitar, and you will find that there is no option to play guitar, and professional level music is also missing.]

4.The following is the error information provided by errorMgnifier: **function: GuitarAcousticOnHotbar -- file: InstrumentGuitarAcousticContextMenu.lua line # 1696 | MOD: Lifestyle Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@dab581bb function: createMenu -- file: ISInventoryPaneContextMenu.lua line # 787 | Vanilla function: doMenu -- file: ISHotbar.lua line # 112 | Vanilla function: onRightMouseUp -- file: ISHotbar.lua line # 280 | Vanilla

ERROR: General , 1696260679556> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: addOption of non-table: null at KahluaThread.tableget line:1689. ERROR: General , 1696260679556> DebugLogStream.printException> Stack trace: java.lang.RuntimeException: attempted index: addOption of non-table: null at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689) at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:641) at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163) at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980) at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1812) 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:64) at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:173) at zombie.Lua.LuaEventManager.triggerEventGarbage(LuaEventManager.java:186) at zombie.Lua.LuaManager$GlobalObject.triggerEvent(LuaManager.java:3080) 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:198) at se.krka.kahlua.integration.expose.MultiLuaJavaInvoker.call(MultiLuaJavaInvoker.java:60) at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:182) at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:1007) at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163) at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980) at se.krka.kahlua.vm.KahluaThread.pcallBoolean(KahluaThread.java:1924) at se.krka.kahlua.integration.LuaCaller.protectedCallBoolean(LuaCaller.java:104) at zombie.ui.UIElement.onRightMouseUp(UIElement.java:1458) at zombie.ui.UIManager.update(UIManager.java:910) at zombie.GameWindow.logic(GameWindow.java:262) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71) at zombie.GameWindow.frameStep(GameWindow.java:765) at zombie.GameWindow.run_ez(GameWindow.java:681) at zombie.GameWindow.mainThread(GameWindow.java:495) at java.base/java.lang.Thread.run(Unknown Source)**

5.console.txt

In summary, I am not sure if this information is valid. If you need more information, I will provide it. Thank you.

Angry362 commented 11 months ago

Thank you for the detailed report :)

Angry362 commented 11 months ago

So what is happening is: a line was incorrectly named in the code for the acoustic guitar for the level 9 and 10 hotbar options; it was "subMenuEOption = subMenu:addOption" when it had to be "subMenuEOption = subMenuE:addOption" (notice the E after subMenu). Double checked the code for every other instrument and thankfully this was only the case for the acoustic guitar.

Line was fixed and will be added to the next update, please do reach out if you need help again in the future :)