Project Zomboid

Project Zomboid

Immersive Solar Arrays (v41, GitHub reupload)
Lu5ck May 1, 2023 @ 2:51am
Error -> function: chargeBatteries
I am seeing this in console log
STACK TRACE ----------------------------------------- function: chargeBatteries -- file: ISAPowerbank_server.lua line # 132 | MOD: Immersive Solar Arrays [23.5.1] function: updatePowerbanks -- file: ISAPowerbankSystem_server.lua line # 166 | MOD: Immersive Solar Arrays [23.5.1] ERROR: General , 1682934555017> 10,803,378> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in chargeBatteries at KahluaUtil.fail line:82. ERROR: General , 1682934555017> 10,803,378> DebugLogStream.printException> Stack trace: java.lang.RuntimeException: Object tried to call nil in chargeBatteries at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:82) at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:973) 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:65) at zombie.GameTime.update(GameTime.java:671) at zombie.gameStates.IngameState.UpdateStuff(IngameState.java:566) at zombie.gameStates.IngameState.updateInternal(IngameState.java:1623) at zombie.gameStates.IngameState.update(IngameState.java:1333) at zombie.network.GameServer.main(GameServer.java:903) LOG : General , 1682934555017> 10,803,379> ----------------------------------------- STACK TRACE ----------------------------------------- function: chargeBatteries -- file: ISAPowerbank_server.lua line # 132 | MOD: Immersive Solar Arrays [23.5.1] function: updatePowerbanks -- file: ISAPowerbankSystem_server.lua line # 166 | MOD: Immersive Solar Arrays [23.5.1]
< >
Showing 1-5 of 5 comments
Poltergeist  [developer] May 1, 2023 @ 4:25am 
Last edited by Poltergeist; May 1, 2023 @ 5:24am
Lu5ck May 1, 2023 @ 10:02am 
That's troubling, I use it on a server, I like the noticeable performance difference, yes my server load the maps faster now. It is quite difficult to get everybody onboard to do those steps, given that I have dozens of players online throughout the the day and also people who logon only on weekends.

Does replacing (pick up & place) the battery rack sufficient to switch to the new mechanic?
Last edited by Lu5ck; May 1, 2023 @ 10:04am
Poltergeist  [developer] May 1, 2023 @ 10:46am 
The specific error is from having items that are not batteries in the container. As far as I know, you only need to take the bad items out of the containers. After that, they are not allowed to be put in.

The other changes were about missing items, this one is rather random and might cause minor glitches.
Lu5ck May 3, 2023 @ 3:42am 
So the error is from non-batteries so I assume is technically non-drainable items?

If I modified the code like this
function SPowerbank:chargeBatteries(container,charge) local items = container:getItems() for i=0,items:size()-1 do local item = items:get(i) if item:IsDrainable() then item:setUsedDelta(charge) else container:Remove(item) end end end
Then let it run for a week like that, it will programmatically remove all the invalid items, yes?
Poltergeist  [developer] May 3, 2023 @ 5:15am 
*check patch here
https://steamcommunity.com/workshop/filedetails/discussion/2857548524/3762229314896836679/#c3823036783898362025

You can remove the AddWorldInventoryItem line if you don't want the items to be dropped on ground.
Last edited by Poltergeist; May 5, 2023 @ 12:16am
< >
Showing 1-5 of 5 comments
Per page: 1530 50