Sokomine / moresnow

Mod for Minetest that adds snow which can lie on stair-like roofs and slabs.
5 stars 0 forks source link

Error with Minetest 5.2 #1

Open Shazen opened 4 years ago

Shazen commented 4 years ago

Hi, since update Minetest 5.2 i encounter an error preventing server to start.

ModError: Failed to load and run script from minetest/mods/moresnow/init.lua:
ERROR[Main]: Unknown node: moresnow:snow
ERROR[Main]: stack traceback:  
ERROR[Main]: [C]: in function 'get_content_id'  
ERROR[Main]: minetest/mods/moresnow/snow_on_construct.lua:23: in function 'build_translation_table'  
ERROR[Main]: minetest/mods/moresnow/init.lua:29: in main chunk

Any idea how to patch this ? Regards, Sha

HybridDog commented 4 years ago

minetest.get_content_id no longer returns the content id of ignore when the node does not exist, but crashes instead. To get the old behaviour, the code can be changed to explicitly check if the node exists: https://github.com/minetest/minetest/pull/9458#issuecomment-600255726

I don't know what the moresnow.build_translation_table function should do: https://github.com/Sokomine/moresnow/blob/9499987f681353b1c632cd23878a7098967e4131/snow_on_construct.lua#L5-L28 id1 is never false or nil.

Shazen commented 4 years ago

Thanks for the Minetest issue, i searched for such info but didn't find. So i think this is the same related issue i declared here too https://github.com/Sokomine/handle_schematics/issues/12#issue-599688505

MidnightPhantom commented 2 years ago

This error happens with minetest 5.5.0 too and please check the thread for full bug report Shazen