Jump to content

Recommended Posts

I fixed (at least I think I fixed) some errors in two of my mods. However, mod tools won't let me update either of them so I can't see if they actually work. 

grue.zip

This mod basically just changes how Charlie attacks the player at night. It should be fairly simple, but I keep getting the "modmain.lua is missing/invalid" error. I think it must be something wrong with my configuration options, but I checked them several times and all the commas and brackets seem to be in the right place.

flameguin.zip 

Modtools can't generate a mod data file for this. The only thing that's different between now and when it let me update it is that I told a prefab to use a different brain file

 

if anyone has any idea how to fix either of these I'd be greatly appreciative :)

  • grue

Error message I got when trying to load the grue mod in moduploader was "modinfo.lua was either missing or invalid".

When trying it with the game, it crashed on startup with

[00:00:10]: Error loading mod: grue-mf99k!
 [string "../mods/grue-mf99k/modinfo.lua"]:60: attempt to index global 'TUNING' (a nil value)
LUA ERROR stack traceback:
        ../mods/grue-mf99k/modinfo.lua(60,1) in main chunk
        =[C] in function 'xpcall'
        scripts/util.lua(597,1) in function 'RunInEnvironment'
        scripts/modindex.lua(392,1) in function 'InitializeModInfo'
        scripts/modindex.lua(326,1) in function 'LoadModInfo'
        scripts/modindex.lua(217,1) in function 'UpdateModInfo'
        scripts/modindex.lua(503,1)
        =[C] in function 'GetPersistentString'
        scripts/modindex.lua(490,1) in function 'Load'
        scripts/main.lua(296,1) in main chunk
	
[00:00:10]: [string "../mods/grue-mf99k/modinfo.lua"]:60: attempt to index global 'TUNING' (a nil value)

modinfo is being loaded in an empty environment (see modindex.lua:L392), so it doesn't have access to TUNING (it doesn't even have access to usual lua functions like tostring).

BTW, modmain is referencing TUNING too, which would fail as well, you'll have to use GLOBAL.TUNING.*.

  • flameguin

It seems moduploader doesn't treat scripts - Shortcut.lnk as a file, but as a link, i.e. it's trying to read files the link points to. Removing the link fixed it and successfully uploaded the mod.

From ModUploader.log:

10:37:58: zipOpenNewFileInZip(scripts - Shortcut.lnk) ok
10:37:58: fopen(C:\Users\<username>\Desktop\mods\flameguin\scripts) failed: 2
10:37:58: EndProgress FAILED: Could not generate mod data file!
10:37:58: MainFrame::OnPublishComplete FAILED: Could not generate mod data file!

 

Edited by Muche
18 hours ago, Muche said:
  • grue

Error message I got when trying to load the grue mod in moduploader was "modinfo.lua was either missing or invalid".

When trying it with the game, it crashed on startup with


[00:00:10]: Error loading mod: grue-mf99k!
 [string "../mods/grue-mf99k/modinfo.lua"]:60: attempt to index global 'TUNING' (a nil value)
LUA ERROR stack traceback:
        ../mods/grue-mf99k/modinfo.lua(60,1) in main chunk
        =[C] in function 'xpcall'
        scripts/util.lua(597,1) in function 'RunInEnvironment'
        scripts/modindex.lua(392,1) in function 'InitializeModInfo'
        scripts/modindex.lua(326,1) in function 'LoadModInfo'
        scripts/modindex.lua(217,1) in function 'UpdateModInfo'
        scripts/modindex.lua(503,1)
        =[C] in function 'GetPersistentString'
        scripts/modindex.lua(490,1) in function 'Load'
        scripts/main.lua(296,1) in main chunk
	
[00:00:10]: [string "../mods/grue-mf99k/modinfo.lua"]:60: attempt to index global 'TUNING' (a nil value)

modinfo is being loaded in an empty environment (see modindex.lua:L392), so it doesn't have access to TUNING (it doesn't even have access to usual lua functions like tostring).

BTW, modmain is referencing TUNING too, which would fail as well, you'll have to use GLOBAL.TUNING.*.

  • flameguin

It seems moduploader doesn't treat scripts - Shortcut.lnk as a file, but as a link, i.e. it's trying to read files the link points to. Removing the link fixed it and successfully uploaded the mod.

From ModUploader.log:


10:37:58: zipOpenNewFileInZip(scripts - Shortcut.lnk) ok
10:37:58: fopen(C:\Users\<username>\Desktop\mods\flameguin\scripts) failed: 2
10:37:58: EndProgress FAILED: Could not generate mod data file!
10:37:58: MainFrame::OnPublishComplete FAILED: Could not generate mod data file!

 

Thanks. I had a feeling it was a shortcutting issue since my computer likes making shortcuts randomly

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...