mt-mods / plantlife_modpack

Other
6 stars 12 forks source link

ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'pl_seaweed'.... #26

Closed AmyMoriyama closed 1 year ago

AmyMoriyama commented 2 years ago
2022-06-23 14:58:39: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'pl_seaweed' in callback luaentity_Step(): Runtime error from mod 'pl_seaweed' in callback item_OnPlace(): ...ds/world/worldmods/plantlife_modpack/pl_seaweed/init.lua:49: attempt to index
2022-06-23 14:58:39: ERROR[Main]:  local 'placer' (a nil value)
2022-06-23 14:58:39: ERROR[Main]: stack traceback:
2022-06-23 14:58:39: ERROR[Main]:   ...ds/world/worldmods/plantlife_modpack/pl_seaweed/init.lua:49: in function <...ds/world/worldmods/plantlife_modpack/pl_seaweed/init.lua:48>
2022-06-23 14:58:39: ERROR[Main]:   [C]: in function 'place_node'
2022-06-23 14:58:39: ERROR[Main]:   /home/username/worlds/world/worldmods/mobs_mc/enderman.lua:270: in function 'do_custom'
2022-06-23 14:58:39: ERROR[Main]:   /home/username/worlds/world/worldmods/mobs_redo/api.lua:3488: in function </home/username/worlds/world/worldmods/mobs_redo/api.lua:3377>
OgelGames commented 2 years ago

Looks like mobs_mc is the cause here, but maybe the seaweed should have a nil check...

S-S-X commented 2 years ago

minetest.place_node is not among best parts of API ... it is really just wrapper around other stuff but built into engine and not deprecated so I guess it must be supported. https://github.com/minetest/minetest/blob/a463620edbe57071a7101297d33226507567ca73/src/script/lua_api/l_env.cpp#L459-L490

I would like to see place_node removed as it does not really add anything, however API function itself does not really have anything to do with nil placer.

This is bug in pl_seaweed (or in engine API development process) but not in mobs_mc which is just calling very simple documented API function.