Trekker Posted January 19, 2021 Posted January 19, 2021 I've been working on a mission file with an A10, yet every time it wont load the DSMS page. I've been in the files, there is no DSMS folder being created, and I've never used the "prepare mission option". I even went in and made a copy and used the "prepare mission" to see if it would make one, and it did not create a DSMS folder I am using MIST 4.whatever (newest release) any help would be really appreciated. Attached is a copy of the mission tryagain2.miz
Yurgon Posted January 19, 2021 Posted January 19, 2021 Tried twice, but my DCS OpenBeta hangs indefinitely when loading the mission. Another mission in the Caucasus terrain with A-10s in it loaded fine. As far as I can tell, loading the DSMS is the least of the problems... 1
Trekker Posted January 19, 2021 Author Posted January 19, 2021 2 hours ago, Yurgon said: Tried twice, but my DCS OpenBeta hangs indefinitely when loading the mission. Another mission in the Caucasus terrain with A-10s in it loaded fine. As far as I can tell, loading the DSMS is the least of the problems... Thanks for the quick response Yurgon. Now this is a weird one. I can load it just fine in the ME, but trying to run it as a mission causes the same hang during load I assume you were getting. I guess I'll start over from scratch... again.
Trekker Posted January 19, 2021 Author Posted January 19, 2021 *update* so it appears what's doing it is my script for adding in nested submenus in the f10 coms menu. the menus themselves work fine, but I loaded everything except that trigger and it the mission works fine, the DSMS will load properly and everything, however with that menu added in suddenly the A10 can't load the tape. I've attached below a copy of the submenu script, be gentle in your criticism of it as scripting is not my forte, about the most coding I do is hex dec on volkswagens and audi's when they come through my shop lol. local subR = missionCommands.addSubMenu('Mission Options') local subN1 = missionCommands.addSubMenu('Tankers', subR) local subN2 = missionCommands.addSubMenu('SHELL 2', subN1) local subN2 = missionCommands.addCommand('Push SHELL 2', subN2, function() trigger.action.setUserFlag('11',true) end) local subN2 = missionCommands.addSubMenu('Arco 2', subN1)local subN2 = missionCommands.addCommand('Push ARCO 2', subN2, function() trigger.action.setUserFlag('12',true) end) local subN2 = missionCommands.addSubMenu('TEXACO 2', subN1) local subN2 = missionCommands.addCommand('Push TEXACO 2', subN2, function() trigger.action.setUserFlag('13',true) end) local subN3 = missionCommands.addSubMenu('QRF Spawning', subR) local subN4 = missionCommands.addCommand('Push QRF - Guns', subN3, function() trigger.action.setUserFlag('14',true) end) local subN4 = missionCommands.addCommand('Push QRF - Ace', subN3, function() trigger.action.setUserFlag('15',true) end) Thanks again.
Yurgon Posted January 20, 2021 Posted January 20, 2021 (edited) Not sure if it has anything to do with it, but two things look a bit off. First, declaring a variable as local only needs to be done once. All following assignments can and should omit the "local" keyword. -- Declare some_var as local, and assign numerical value "1" to it local some_var = 1 -- Assign numerical value "2" to some_var. It'll still be the same local variable, but with another value ;) some_var = 2 Possibly more important, you keep assigning new values to the subN2 variable for no apparent reason. This may well be *the* culprit here. Let me just rewrite that thing in a way that looks more plausible to me (but entirely untested and unverified ) local subR = missionCommands.addSubMenu('Mission Options') local subN1 = missionCommands.addSubMenu('Tankers', subR) -- Declare and assign subN2 only once -- subN2 will be assigned as argument to other commands below local subN2 = missionCommands.addSubMenu('SHELL 2', subN1) missionCommands.addCommand('Push SHELL 2', subN2, function() trigger.action.setUserFlag('11',true) end) missionCommands.addSubMenu('Arco 2', subN1) missionCommands.addCommand('Push ARCO 2', subN2, function() trigger.action.setUserFlag('12',true) end) missionCommands.addSubMenu('TEXACO 2', subN1) missionCommands.addCommand('Push TEXACO 2', subN2, function() trigger.action.setUserFlag('13',true) end) local subN3 = missionCommands.addSubMenu('QRF Spawning', subR) -- These used to be assigned subN4, but the variable serves no purpose at all; let's omit it altogether missionCommands.addCommand('Push QRF - Guns', subN3, function() trigger.action.setUserFlag('14',true) end) missionCommands.addCommand('Push QRF - Ace', subN3, function() trigger.action.setUserFlag('15',true) end) Edited January 20, 2021 by Yurgon Attempt to fix syntax highlighting 1
Trekker Posted January 21, 2021 Author Posted January 21, 2021 (edited) 21 hours ago, Yurgon said: Not sure if it has anything to do with it, but two things look a bit off. First, declaring a variable as local only needs to be done once. All following assignments can and should omit the "local" keyword. -- Declare some_var as local, and assign numerical value "1" to it local some_var = 1 -- Assign numerical value "2" to some_var. It'll still be the same local variable, but with another value ;) some_var = 2 Possibly more important, you keep assigning new values to the subN2 variable for no apparent reason. This may well be *the* culprit here. Let me just rewrite that thing in a way that looks more plausible to me (but entirely untested and unverified ) local subR = missionCommands.addSubMenu('Mission Options') local subN1 = missionCommands.addSubMenu('Tankers', subR) -- Declare and assign subN2 only once -- subN2 will be assigned as argument to other commands below local subN2 = missionCommands.addSubMenu('SHELL 2', subN1) missionCommands.addCommand('Push SHELL 2', subN2, function() trigger.action.setUserFlag('11',true) end) missionCommands.addSubMenu('Arco 2', subN1) missionCommands.addCommand('Push ARCO 2', subN2, function() trigger.action.setUserFlag('12',true) end) missionCommands.addSubMenu('TEXACO 2', subN1) missionCommands.addCommand('Push TEXACO 2', subN2, function() trigger.action.setUserFlag('13',true) end) local subN3 = missionCommands.addSubMenu('QRF Spawning', subR) -- These used to be assigned subN4, but the variable serves no purpose at all; let's omit it altogether missionCommands.addCommand('Push QRF - Guns', subN3, function() trigger.action.setUserFlag('14',true) end) missionCommands.addCommand('Push QRF - Ace', subN3, function() trigger.action.setUserFlag('15',true) end) so after some testing, it's not the submenu script (although I do thank you for cleaning that up) it's actually MIST 4.4.90... something I didn't remember having an issue with in past verions. Loading a clean map with that using do script file as instructed will lock out the DSMS, without ever using the "prepare mission" or anything else. I've attached a clean mission (1 A10C II located at Senaki, Caucuses) with the simple trigger to load MIST, and you can see it locks the tape. I then went into the mission zip, and was unable to find any folders that others recommend deleting in other threads. As it is I'm stuck now, as other trigger functions I use use the MIST tools for things like flag assignments and respawning, so until I either find a legacy version of MIST that doesn't do this, or the authors of MIST address the issue, I'm unable to continue the design of my mission, not to mention having to scrap everything I've done up to this point lol. Caucasus_ATIS_Hidden_Template-testing.miz Edited January 21, 2021 by Trekker
Yurgon Posted January 21, 2021 Posted January 21, 2021 4 hours ago, Trekker said: Loading a clean map with that using do script file as instructed will lock out the DSMS, without ever using the "prepare mission" or anything else. I've attached a clean mission (1 A10C II located at Senaki, Caucuses) with the simple trigger to load MIST, and you can see it locks the tape. Thanks for the mission! I just tried it and found no problems with the DSMS in it. I changed weapons 4 times, and each time the DSMS also reloaded just fine from the LOAD page. The typical problem from having a DSMS folder in the mission file is that rearming and then reloading the DSMS doesn't work; all changed station will show up read even after reloading the DSMS. No such problem in this mission, at least not just now when I tested it. Could you be a little more specific what exactly happens for you, and what you mean by the game not loading the DSMS page or a "tape" being locked? At this point I think a track or a video might also help.
Recommended Posts