Project Zomboid

Project Zomboid

Immersive Solar Arrays (v41, GitHub reupload)
Lu5ck 1. maj 2023 kl. 2:51
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]
< >
Viser 1-5 af 5 kommentarer
Poltergeist  [udvikler] 1. maj 2023 kl. 4:25 
Sidst redigeret af Poltergeist; 1. maj 2023 kl. 5:24
Lu5ck 1. maj 2023 kl. 10:02 
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?
Sidst redigeret af Lu5ck; 1. maj 2023 kl. 10:04
Poltergeist  [udvikler] 1. maj 2023 kl. 10:46 
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 3. maj 2023 kl. 3:42 
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  [udvikler] 3. maj 2023 kl. 5:15 
*check patch here
https://psteamcommunity.yuanyoumao.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.
Sidst redigeret af Poltergeist; 5. maj 2023 kl. 0:16
< >
Viser 1-5 af 5 kommentarer
Per side: 1530 50