Project Zomboid

Project Zomboid

Soul Filcher's Farming Time
Wayfarer 15. juli 2021 kl. 2:59
[Solved] Error with SFFarmFarmingSystem growPlant [IWBUMS 41.50]
Hey,

I think an error I'm seeing in my console.txt is coming from this mod. There was a particular block of code I commented out and the errors went away - but the code looks like it's the dynamic handling for growing custom crops. I assume without it, they wouldn't grow. I didn't play on to verify.

Error snip:
STACK TRACE ----------------------------------------- function: growPlant -- file: SFFarmFarmingSystem.lua line # 21 function: checkPlant -- file: SFarmingSystem.lua line # 195 function: EveryTenMinutes -- file: SFarmingSystem.lua line # 140 function: EveryTenMinutes -- file: SFarmingSystem.lua line # 379 ERROR: General , 1626342663819> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: typeofseed of non-table: null at KahluaThread.tableget line:1689.

growPlant bit in SFFarmFarmingSystem.lua
elseif luaobject.typeofseed then if farming_vegetableconf.props[luaobject.typeofseed].growcode ~= nil then local growcode = farming_vegetableconf.props[luaobject.typeofseed].growcode luaobject = assert(loadstring('return '..growcode..'(...)'))(luaobject, nextgrowing, updatenbofgrow) end

The console message references base game SFarmingSystem.lua as well though, so not totally sure what's going on.
Sidst redigeret af Wayfarer; 16. juli 2021 kl. 2:58
< >
Viser 1-1 af 1 kommentarer
Wayfarer 16. juli 2021 kl. 3:00 
Look like it's case-sensitivity. The reference is to "luaobject" rather than "luaObject". I changed it in my file and no more errors. Also changed the others - growCode, nextGrowing, updateNbOfGrow.
Sidst redigeret af Wayfarer; 16. juli 2021 kl. 3:16
< >
Viser 1-1 af 1 kommentarer
Per side: 1530 50