Igneous01 Posted May 25, 2017 Share Posted May 25, 2017 I'm trying to figure out how to make lfs and io available to my mission. I saw this link in mist: http://wiki.hoggit.us/view/Dump_G For functions mist.debug.dump_G, mist.debug.writeData, and mist.debug.dumpDBs, you must (temporarily!) unprotect the Lua environment and enable the io and lfs libraries. You do this by commenting out the sanitizeModule calls in <DCS main directory>/Scripts/MissionScripting.lua. Just be sure to re-protect yourself later when you run missions from untrusted sources. So I followed those instructions and commented out the sanitizeModule calls in the MissionScripting.lua file (for all the apis). I saved it and restarted DCS. When I go back into mission and try something like env.info(lfs.writedir() or _G["lfs"] or lfs == nil it's always telling me lfs is nil. When I try using lfs = require ("lfs") it tells me require is nil. I made sure to comment out those things so that loadlib and require are available, but everything is still nil in ME environment. How do I get access to these libraries? Developer of Kaukasus Insurgency - a customizable Dynamic PvE Campaign with cloud hosting and stats tracking. (Alpha) http://kaukasusinsurgency.com/ Link to comment Share on other sites More sharing options...
FlightControl Posted May 25, 2017 Share Posted May 25, 2017 Have a look here, in chapter 1.8 http://flightcontrol-master.github.io/MOOSE/Documentation/Scoring.html [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE] Link to comment Share on other sites More sharing options...
Grimes Posted May 25, 2017 Share Posted May 25, 2017 Are you running any mods, specifically slmod? I used slmod as an example because it modifies missionscripting.lua which would overwrite any changes you made. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum Link to comment Share on other sites More sharing options...
Igneous01 Posted May 28, 2017 Author Share Posted May 28, 2017 I found the problem - my 1.5 dcs created a seperate install inside of my existing DCS World\bin directory, so I was editing a file that wasn't being loaded by the game. Reinstalled and fixed the path issues and now I can use io and lfs. Thanks guys! Developer of Kaukasus Insurgency - a customizable Dynamic PvE Campaign with cloud hosting and stats tracking. (Alpha) http://kaukasusinsurgency.com/ Link to comment Share on other sites More sharing options...
Recommended Posts