FaceDeer / dfcaverns

Replicating Dwarf Fortress' underground flora in Minetest
Other
16 stars 9 forks source link

ModError: Failed to load and run script #13

Open Lemente opened 4 years ago

Lemente commented 4 years ago

Hello, I have been trying to install that mod, but best case scenario I get this error : ModError: Failed to load and run script from C:\Users\Lem\Desktop\minetest-5.1.0-win64\bin\..\mods\dfcaverns-master\df_caverns\init.lua: ...win64\bin\..\mods\dfcaverns-master\df_caverns/level1.lua:284: attempt to call field 'register_layer' (a nil value) stack traceback: ...win64\bin\..\mods\dfcaverns-master\df_caverns/level1.lua:284: in main chunk [C]: in function 'dofile' ...0-win64\bin\..\mods\dfcaverns-master\df_caverns\init.lua:11: in main chunk

I am using Minetest 5.1.0 on windows 10, and the MTG. I have the dependencies (tried with them in the modpack, or in the mod folder).

I have no idea what else I could try. Can you help me?

FaceDeer commented 4 years ago

Well, that's peculiar. According to this callstack subterrane.register_layer doesn't exist. But subterrane itself has loaded and the subterrane global table exists, otherwise you'd have got the error "attempt to index global 'subterrane' (a nil value)".

My normal troubleshooting questions for subterrane problems would be "is there actually anything in the subterrane folder?" (since it's a Git sub-project it needs special synching procedures) and "is subterrane up to date?". But both of those are already ruled out, you've got something in your subterrane folder and I don't think any version of subterrane no matter how old would lack the "register_layer" function since that's what it's all about. And I'm on Windows 10 too, so it's not an OS specific thing.

Where did you get the version you installed, was it synched through git or did you download it using ContentDB? Due to the way git makes sub-projects like subterrane tricky I submitted a pre-packaged .zip to ContentDB that had everything already in it. I did a test install of dfcaverns on a fresh copy of Minetest to test it, but I don't know, maybe I overlooked something.

Lemente commented 4 years ago

So, I was trying to reproduce the error, and I actually found the issue.

I was able to make dfcaverns works with an empty mod folder. But as soon as I have on of its dependency, even not activated, in my mod folder, it deactivate the one in the modpack. when I first activate the modpack : 73c34a4c21cf713d8b74eb040b1c9271

after I save it and reopen it, without starting the game : 04b2d8e28823cb5bd8f94d34c29da26b

I did download mapgen_helper and subterrane, since they are marked as dependencies on the contentDB.

bartart3d commented 4 years ago

The same thing happens here too, when subterrane as seperate mod is uninstalled, dfcaverns works, not flawless, I get a lot of red warning text, but that's for another issue.

FaceDeer commented 1 year ago

This issue's a couple of years old now. Hopefully whatever weirdness was causing it has been resolved?

Lemente commented 1 year ago

yes, it was an old Minetest issue that was fixed recently https://github.com/minetest/minetest/issues/4183