dizietemblesssma Posted January 18, 2022 Share Posted January 18, 2022 Hi, I'm tring to follow the example here:https://github.com/Neanka/MCM_0.1_AS3/wiki/Control-Typesof a button, this is my first attempt at an MCM menu in F4.This is my config.json and it does show the two buttons: { "modName": "dz_no_attacks", "displayName": "MCM for No Settlement Attacks", "minMcmVersion": 2, "content": [ { "text": "Demo Button", "type": "button", "help": "This button disallows attacks at abernathy.", "action": { "type": "CallFunction", "form": "dz_no_attacks.esp|800", "function": "dz_disallow_attacks", "params": [] } }, { "text": "Another Demo Button", "type": "button", "help": "Displays a messagebox via a CallGlobalFunction action.", "action": { "type": "CallGlobalFunction", "script": "Debug", "function": "MessageBox", "params": ["Hello world!"] } } ] }Now at the moment the call to the global debug function works, but I cannot get this function to run from the top button in my test script: Scriptname dz_no_attacks_quest_script Extends Quest Function dz_disallow_attacks() debug.trace("value is ") debug.messagebox("new value is ") EndFunctionthere is neither a message box in game, or a trace in the Papyrus.log.0 file.The script is attached to a quest, and that quest shows up in the console so I assume it is running? diziet Link to comment Share on other sites More sharing options...
niston Posted January 18, 2022 Share Posted January 18, 2022 Yor function dz_disallow_attacks() is not a global function. Link to comment Share on other sites More sharing options...
KyleSimmons Posted January 18, 2022 Share Posted January 18, 2022 Are you sure that your quest's formID is 800? Suspicious that it would be the exact same formID as in the sample on github. The form field accepts the plugin name and the form ID of the form that you want to call the function on. In most cases, this form is a Quest. For example, if your quest has the formID 0000173E, then you would specify "MyMod.esp|173E" as the form parameter. This tells the MCM where the function is located in. Link to comment Share on other sites More sharing options...
dizietemblesssma Posted January 18, 2022 Author Share Posted January 18, 2022 Yes it is 800, it was F99, but in an attempt to cover every possibility I changed it and then changed the config:)As for the function not being global, that is confusing, because the necessity of specifying the form and script seems odd for a global function, and the MCM config posted has a section for a global function, which is a different format?Is my mistake in expecting the trace or messagebox to work from an MCM menu? diziet Link to comment Share on other sites More sharing options...
dizietemblesssma Posted January 20, 2022 Author Share Posted January 20, 2022 Well I fixed it , but I don't know how. I decided to deliberately make the esp name false to see what error message I would get. Sure enough in MCM.log it said the esp was wrong, which meant at least that the MCM menu was getting that far, I simply renamed the esp back, and it started working! Since all I did was removed the first 's' in:"form": "dz_no_attacks.esp|800"and then put it back, I have no clue, perhaps some odd formatting thing in notepad++? Anyway, thankyou for your replies. diziet Link to comment Share on other sites More sharing options...
Recommended Posts