Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModError: Failed to load and run script #13

Open
Lemente opened this issue Feb 14, 2020 · 5 comments
Open

ModError: Failed to load and run script #13

Lemente opened this issue Feb 14, 2020 · 5 comments

Comments

@Lemente
Copy link

Lemente commented Feb 14, 2020

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
Copy link
Owner

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
Copy link
Author

Lemente commented Apr 4, 2020

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.

@Lemente Lemente mentioned this issue Apr 4, 2020
@bartart3d
Copy link

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
Copy link
Owner

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

@Lemente
Copy link
Author

Lemente commented Aug 31, 2022

yes, it was an old Minetest issue that was fixed recently
minetest/minetest#4183

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants