dawgdoc wrote:I know you are no longer working on this, so I am not asking for updates, simply guidance on how I can fix the following error on my singleplayer worlds. And maybe it is of use to you since you are bringing the server back.
I don't actually recall what my activity was at the time the error occurred. But I think I was in my home transferring items from inventory to chests. In world it was either spring or summer, the trees were green with apples on them and crops were growing. I was playing on an existing world, the subgame and been last updated to the github version early on 10 Dec. Anyhow, running MT 0.4.16 on LinuxMint 18.2 (based on Ubuntu 16.04). This is on a Dell laptop: AMD A10 cpu (quad core 1.8gHz), 12GB ram, R6 graphics. The subgame shutdown and a dialog appeared referring to this error found in debug.txt.
- Code: Select all
-------------
Separator
-------------
2017-12-12 03:57:16: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'mymonths' in callback LuaABM::trigger(): ...xtreme-Survival-Minetest-04.16/mods/mymonths/flowers.lua:86: bad argument #2 to 'random' (number expected, got nil)
2017-12-12 03:57:16: ERROR[Main]: stack traceback:
2017-12-12 03:57:16: ERROR[Main]: [C]: in function 'random'
2017-12-12 03:57:16: ERROR[Main]: ...xtreme-Survival-Minetest-04.16/mods/mymonths/flowers.lua:86: in function <...xtreme-Survival-Minetest-04.16/mods/mymonths/flowers.lua:64>
Lines 85 to 89 of /mymonths/flowers.lua read
- Code: Select all
if minetest.get_node(pos).name == 'air' then
local key = math.random(1, mymonths.flower_number)
local placed_flower = mymonths.flowers[key]
minetest.set_node(pos, {name = placed_flower})
end
Fixed! And I am still working on this game. The bug was one line of code was missing in the flowers Lia, one of those files. All should be good now.