Jump to content

MCM and papyrus log error


Recommended Posts

Every time I select my mod in the MCM config this error pops up in the papyrus.0.log

[12/10/2024 - 08:58:05PM] error: Incorrect number of arguments passed. Expected 1, got 0.
stack:
    <empty stack>

it does not occur for any other MCM menu, I can only assume that selecting the MCM menu for my mod is causing some script to run that gives the error, but I have no idea how to find it, this is my config.json (not the original, this is for testing):

{
    "modName": "dz_auto_save_F4",
    "displayName": "Diziet's Auto Save",
    "minMcmVersion": 2,
	"pluginRequirements": ["dz_auto_save_F4.esp"],
	"content": [
	]
}

any ideas how to trouble shoot this? To be fair I don't know if this error is significant but my original config.json, while showing in the MCM config and somewhat working, has issues I can't work out, so I'm trying to ensure a clean environment:)

 

diziet

Link to comment
Share on other sites

I think I found it,

in MCM.psc there is this:

; Events dispatched by the MCM:
; - OnMCMSettingChange(string modName, string id)
; - OnMCMMenuOpen(string modName)
; - OnMCMMenuClose(string modName)

so I put the following into a script I attached to a quest:

RegisterForExternalEvent("OnMCMMenuOpen", "OnMCMMenuOpen")

along with:

Function OnMCMMenuOpen(string modName)
	debug.trace("DAS: OnMCMMenuOpen detected")
EndFunction

when I removed the "string modname" from the function thus:

Function OnMCMMenuOpen()
	debug.trace("DAS: OnMCMMenuOpen detected")
EndFunction

the error went away, which now I see the cause, is a very coherent error!

I can also report that this works:

RegisterForExternalEvent("OnMCMMenuOpen|dz_auto_save_F4", "OnMCMMenuOpen")

so as long as I don't want to know about more than one menu I should be fine; unfortunately this doesn't seem like it's going to help me with the fuller config.json problems:)

 

diziet

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...