spacemishka Posted September 25, 2021 Posted September 25, 2021 hi there, when i change my LUA-skript and restart the mission, i see that the old version is still loaded in the temp folder. How can i force the ME to get the latest version of the script file? thanks!
spacemishka Posted September 25, 2021 Author Posted September 25, 2021 i switching currently between do script and do file and save in between to enforce loading. But this is realy insane....
Grimes Posted September 26, 2021 Posted September 26, 2021 While not applicable for publishing missions when you are testing lua code you can call a loadfile that looks at a specific folder location on your PC. Since it is running a local file all you gotta do is save the file where-ever you are editing it and restart the mission. Then when done you switch back to embedding it in the miz with do script file. local path ='J:\\Dropbox\\\Projects\\DCSMissions\\' assert(loadfile(path .. "myCode.lua"))() 1 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
spacemishka Posted September 26, 2021 Author Posted September 26, 2021 vor 19 Stunden schrieb Grimes: While not applicable for publishing missions when you are testing lua code you can call a loadfile that looks at a specific folder location on your PC. Since it is running a local file all you gotta do is save the file where-ever you are editing it and restart the mission. Then when done you switch back to embedding it in the miz with do script file. local path ='J:\\Dropbox\\\Projects\\DCSMissions\\' assert(loadfile(path .. "myCode.lua"))() Thanks!!
spacemishka Posted September 28, 2021 Author Posted September 28, 2021 Am 26.9.2021 um 02:08 schrieb Grimes: While not applicable for publishing missions when you are testing lua code you can call a loadfile that looks at a specific folder location on your PC. Since it is running a local file all you gotta do is save the file where-ever you are editing it and restart the mission. Then when done you switch back to embedding it in the miz with do script file. local path ='J:\\Dropbox\\\Projects\\DCSMissions\\' assert(loadfile(path .. "myCode.lua"))() Works pretty fine. I couldn't find it in the documentation. I think it it worth a note!
Grimes Posted September 28, 2021 Posted September 28, 2021 http://www.lua.org/manual/5.2/manual.html#pdf-loadfile The hoggit wiki doesn't really cover any of the built in lua functionality other than linking to a few lua pages that are useful. TBH I haven't put much thought into adding anything like that to it because the information is out there and more detailed than what could be added to the wiki. Maybe a basic FAQ type page with a few general tidbits like that or something would suffice. 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
Recommended Posts