Lineaxe Posted December 18, 2020 Share Posted December 18, 2020 Well I played the mission for hours last night with no problem. I update today and now I get the following error. attempt to index field 'Airbase' (a nil value) Now, the line(s) that it refers to has always worked ,there is no syntax error and the code ran for almost a month now. I have no idea what to do to fix this . it also does not display any trigger statements anymore and so on. trigger.action.outText will not display anything , I don't know if it has anything to do with the fact it can't find the AIRBASE table anymore. I really could use some help getting this fixed!!! Link to comment Share on other sites More sharing options...
dorianR666 Posted December 18, 2020 Share Posted December 18, 2020 nobody can help you if you dont post the piece of code that throws the error CPU: AMD Ryzen 5 1600X GPU: AMD RX 580 Link to comment Share on other sites More sharing options...
Lineaxe Posted December 19, 2020 Author Share Posted December 19, 2020 There is a trigger.action.outText line I that sent in the post I started. In the mission file I wrote and tested for over 9 months ,It is the top line of the code and it does not work anymore at all and neither does the rest of the code. Very frustrating , and especially no way for me to figure out why this happened after I did the latest update. So looks like over xmas we won't be playing. Like I mentioned , very frustrating after all that work and time spent coding. and All of it was difficult to do because there are no resources to go to when stuff like this happens. Link to comment Share on other sites More sharing options...
dorianR666 Posted December 19, 2020 Share Posted December 19, 2020 32 minutes ago, Lineaxe said: There is a trigger.action.outText line I that sent in the post I started thats not the code. this says nothing about the problem. post the code that touches the airbase field. do you want to be helped or not? 34 minutes ago, Lineaxe said: ,It is the top line of the code and it does not work anymore at all and neither does the rest of the code also, once an error pops out, the rest of the script will not be executed anymore. CPU: AMD Ryzen 5 1600X GPU: AMD RX 580 Link to comment Share on other sites More sharing options...
Lineaxe Posted December 20, 2020 Author Share Posted December 20, 2020 (edited) THANK YOU for your quick replies & intesest in this . If needed I can supply more of the lua code , too much of it here would not be a good idea I think. To make it more readable I will break this into sections. here is the line of code which ran without error since April 2020 and that now seems to flag an error in the dsclog file : -------------------------------- A2ADispatcherRd:SetSquadron( "Al Minhad AB Squadron1", AIRBASE.PersianGulf.Al_Minhad_AB, { "MigMoo" }, 200 ) -- 200 aircraft max -------------------------------- here is the dcslog debug lines relevant to the problem it reports: -------------------------------- 2020-12-20 11:06:37.658 ERROR SCRIPTING: Mission script error: [string "C:\Users\jimru\AppData\Local\Temp\DCS.openbeta\/~mis000048F9.lua"]:115460: attempt to index field 'Airbase' (a nil value) stack traceback: [C]: ? [string "C:\Users\jimru\AppData\Local\Temp\DCS.openbeta\/~mis000048F9.lua"]:115460: in function 'SetSquadron' [string "C:\Users\jimru\Documents\LUA TOOLS\workspace\My_Missions\ChopU\main.lua"]:143: in function 'setupRedSquadranAirDefense' [string "C:\Users\jimru\Documents\LUA TOOLS\workspace\My_Missions\ChopU\main.lua"]:80: in function 'createRndRedTanks' [string "C:\Users\jimru\Documents\LUA TOOLS\workspace\My_Missions\ChopU\main.lua"]:861: in main chunk [string "assert(loadfile("C:\\Users\\jimru\\Documents\\LUA TOOLS\\workspace\\My_Missions\\ChopU\\main.lua"))()"]:1: in main chunk -------------------------------- No idea what stopped it from working . I tested the mission the night before for hours. Edited December 20, 2020 by Lineaxe Link to comment Share on other sites More sharing options...
Iceviper Posted December 20, 2020 Share Posted December 20, 2020 (edited) According to recent announcement on the Moose discord the airbases on the Persian Gulf have had their names updated. Could it be in your code you now need to change references to your afb. Quote from Discord funkyfranky18/12/2020 @everyone In yesterday's DCS OB update, quite a few airbase names in the Persian Gulf map changed. That breaks your existing missions if you refer to one of those airbases as simple string or use the AIRBASE.PersianGulf.<Airbase Name> enumerators. The enums have just been updated in the Moose master and develop branches - thanks @[GR] Ironwulf. What do I need to do? - If you use the enums, e.g. AIRBASE.PersianGulf.Jiroft_Airport, you can simple include the latest Moose.lua and your missions will work again. - If you refer to the airbase name by a simple string, e.g. "Jiroft Airport", you need to change that to "Jiroft" as this is now the name. (Or you start using the enums as destribed above.) 3 5 [13:06] Edited December 20, 2020 by Iceviper Link to comment Share on other sites More sharing options...
Lineaxe Posted December 21, 2020 Author Share Posted December 21, 2020 Hey, you guys are good . Right now I am coding away in C++ in another project and really don't have spare time at the moment to try and figure all the kind of stuff out. I am off to get the latest moose .. (do mooses go moo I have often wondered?) Thanks for your quick help , I thot I was a goner this xmas for any playing of the mission ! Link to comment Share on other sites More sharing options...
Lineaxe Posted December 21, 2020 Author Share Posted December 21, 2020 I downloaded latest moose and tested it out after installing it . Seems the naming problem persists. I will look into the other method I guess but that would change the way moose demo missions work. So, kinda confused , but I am ON THE PATH agin ... Link to comment Share on other sites More sharing options...
Iceviper Posted January 23, 2021 Share Posted January 23, 2021 There's a new moose out so might want to try the new version in your mission in case you didn't manage to fix your issue. -----------------------------------------------@everyone Time to release MOOSE v2.5.3DOWNLOAD https://github.com/FlightControl-Master/MOOSE/releases/tag/v2.5.3Many improvements and fixed issues. Thanks for your contribution slight_smileAIRBASE* Updated AIRBASE.PersianGulf enum airbase names after ED decided to change them.AIRBOSS* Added USS Harry S. Truman (CVN-75) as supported supercarrier module* Added HB F-14AMANTIS- New WIP class to control a network of SAM sites by @Applevangelist - Docs https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Mantis.htmlAI_CARGO_SHIP and AI_CARGO_DISPATCHER_SHIP- New classes which add cargo transportation via ship by@acrojason - Docs https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/AI.AI_Cargo_Ship.html- Docs https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/AI.AI_Cargo_Dispatcher_Ship.htmlIf you find an issue where you are confident that it is a MOOSE bug (not a DCS bug or a user error), the best place to report it, is the github issues page https://github.com/FlightControl-Master/MOOSE/issuesSent from my POT-LX1 using Tapatalk Link to comment Share on other sites More sharing options...
Recommended Posts