Project Zomboid

Project Zomboid

True Music B42
bug
I'm encountering an error message when I right-click the 'Sany Wutman' portable player. I believe this error is occurring due to an issue with deleting and re-adding the radio context

`function: createMenu -- file: InvContextBoombox.lua line # 23 | MOD: True Music_b42 function: checkInvItem -- file: ISMenuContextInventory.lua line # 54 | Vanilla function: createMenu -- file: ISMenuContextInventory.lua line # 39 | Vanilla function: createInventoryMenu -- file: ISContextManager.lua line # 34 | Vanilla Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@1ef260d8 function: createMenu -- file: ISInventoryPaneContextMenu.lua line # 896 | Vanilla function: createMenu -- file: TransmogContextMenu.lua line # 5 | MOD: [Hx] Fashionoid - Clothing transmog function: onRightMouseUp -- file: ISInventoryPane.lua line # 1459 | Vanilla java.lang.RuntimeException: Object tried to call nil in createMenu at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:82) at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:954) 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:410) at zombie.Lua.LuaEventManager.triggerEventGarbage(LuaEventManager.java:423) at zombie.Lua.LuaManager$GlobalObject.triggerEvent(LuaManager.java:4238) 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.onRightMouseUp(UIElement.java:1919) at zombie.ui.UIElement.onRightMouseUp(UIElement.java:1877) at zombie.ui.UIElement.onConsumeMouseButtonUp(UIElement.java:1691) 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) `
< >
Showing 1-6 of 6 comments
scrappy coco  [developer] 2 Jan @ 2:17am 
i dont know what is the cause, but you can equip the Sany Wutman primary and the Menu should appear
Last edited by scrappy coco; 2 Jan @ 2:18am
tatoe 3 Jan @ 7:16pm 
Copying over the removeOptionTsar function from tsarlib's ISContextMenuExtension.lua seems to fix the error when right clicking Walkman in inventory. Also not a modder so I don't really know what this does or know if this breaks anything, but I noticed that this function was the only one I couldn't find in TrueMusic for the Walkman:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2392709985
function ISContextMenu:removeOptionTsar(option) -- print("ISContextMenu:removeOption") if option then table.insert(self.optionPool, self.options[option.id]) self.options[option.id] = nil; for i = option.id, self.numOptions - 1 do self.options = self.options[i+1]
if self.options then
self.options.id = i
end
end
self.numOptions = self.numOptions - 1;
self:calcHeight()
end
end
Last edited by tatoe; 4 Jan @ 11:08pm
loud 18 Jan @ 2:53pm 
Originally posted by tatoe:
Copying over the removeOptionTsar function from tsarlib's ISContextMenuExtension.lua seems to fix the error when right clicking Walkman in inventory. Also not a modder so I don't really know what this does or know if this breaks anything, but I noticed that this function was the only one I couldn't find in TrueMusic for the Walkman:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2392709985
function ISContextMenu:removeOptionTsar(option) -- print("ISContextMenu:removeOption") if option then table.insert(self.optionPool, self.options[option.id]) self.options[option.id] = nil; for i = option.id, self.numOptions - 1 do self.options = self.options[i+1]
if self.options then
self.options.id = i
end
end
self.numOptions = self.numOptions - 1;
self:calcHeight()
end
end [/quote]



plz explain to ad imbecile how to do this i am having the same issue
Hermago 2 Jun @ 7:42pm 
Hi. I found a small error your mod is throwing at me. You'll need to replace the distribution list, as it was updated with B42, and that's it. But good work.

This is the changes on B42:

WardrobeWoman now is WardrobeGeneric
WardrobeWomanClassy now is WardrobeClassy
WardrobeManClassy now is WardrobeClassy

then, you need this:

string[] ProceduralDistributionsItemsCassette = new string[] {
// vanila Места, где появляются диски и шансы
"BandPracticeInstruments", // 20 10
"BedroomDresser", // 2
"BedroomSideTable", // 2
"ClosetShelfGeneric", // 2
"CrateCompactDiscs", // 50 20 20 10 10
"CrateRandomJunk", // 1
"DeskGeneric", // 2
"DresserGeneric", // 2
"ElectronicStoreMusic", // 20 20 10 10
"ElectronicStoreMusic", // junk 100
"FactoryLockers", // 2
"FireDeptLockers", // 2
"FitnessTrainer", // 2
"Gifts", // 2
"GolfLockers", // 2
"GymLockers", // 2
"Hobbies", // 2
"HolidayStuff", // 2
"HospitalLockers", // 2
"LivingRoomShelf", // 4
"LivingRoomShelfNoTapes", // 4
"LivingRoomSideTable", // 2
"LivingRoomSideTableNoRemote", // 2
"Locker", // 2
"LockerClassy", // 2
"MusicStoreCDs", // 50 20 20 10 10
"MusicStoreSpeaker", // 20 20 10 10
"OfficeDesk", // 2
"OfficeDeskHome", // 2
"OfficeDrawers", // 2
"PoliceDesk", // 2
"PoliceLockers", // 2
"SchoolLockers", // 4
"SecurityLockers", // 2
"ShelfGeneric", // 2
"WardrobeChild", // 2
"WardrobeRedneck", // 2
"WardrobeGeneric", // 2
"WardrobeClassy", // 2
};
etc.. :steamhappy:
Last edited by Hermago; 2 Jun @ 7:42pm
I cannot play the cassettes,
or insert the cassettes into the boombox etc. in the existing slot
Update 42.10
Callframe at: createMenuEntries
function: createMenu -- file: ISWorldObjectContextMenu.lua line # 661 | Vanilla
function: createMenu -- file: ISMenuContextWorld.lua line # 50 | Vanilla
function: createWorldMenu -- file: ISContextManager.lua line # 28 | Vanilla
function: doRClick -- file: ISObjectClickHandler.lua line # 63 | Vanilla
function: onObjectRightMouseButtonUp -- file: ISObjectClickHandler.lua line # 429 | Vanilla

ERROR: General f:28343, t:1751973416270> ExceptionLogger.logException> Exception thrown
java.lang.reflect.InvocationTargetException at NativeMethodAccessorImpl.invoke0 (Native Method).
Stack trace:
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.base/java.lang.reflect.Method.invoke(Unknown Source)
se.krka.kahlua.integration.expose.caller.MethodCaller.call(MethodCaller.java:62)
se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:211)
se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:201)
se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:192)
se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:988)
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:1790)
se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
zombie.Lua.Event.trigger(Event.java:72)
zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:410)
zombie.ui.UIManager.updateMouseButtons(UIManager.java:966)
zombie.ui.UIManager.update(UIManager.java:716)
zombie.GameWindow.logic(GameWindow.java:326)
zombie.GameWindow.frameStep(GameWindow.java:916)
zombie.GameWindow.mainThreadStep(GameWindow.java:642)
zombie.MainThread.mainLoop(MainThread.java:76)
java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Double (java.lang.String and java.lang.Double are in module java.base of loader 'bootstrap')
zombie.ui.ISUIWrapper.LuaHelpers.castDouble(LuaHelpers.java:84)
zombie.iso.ISWorldObjectContextMenuLogic.handleInteraction(ISWorldObjectContextMenuLogic.java:2969)
zombie.iso.ISWorldObjectContextMenuLogic.createMenuEntries(ISWorldObjectContextMenuLogic.java:734)
< >
Showing 1-6 of 6 comments
Per page: 1530 50