Jump to content

Making lfs and io available in ME Script Environment


Igneous01

Recommended Posts

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

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

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 ServerScripting 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

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

  • Recently Browsing   0 members

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