Jump to content

Mission file does not update when modiying an included lua script


Recommended Posts

Posted (edited)

Some part of my mission is managed by a lua script file I load in a "do script file" action.

 

The issue is when I modify the lua script, and even if I click save button, the .miz file doesn't seem to be updated with the new script file, it's like the editor does not refresh included script file until a do "open" in the "do script file" action and browse for the same file again. Then if I save the mission, the lua script is updated correctly, but I would like a way to have the lua script file updated in the mission without clicking "open" button each time.

 

Anyone already had this issue ? Is the a way to fix that ?

Edited by sigzegv
Posted

After modification of your LUA script, save it on your PC. Delete the Do Script File action in the mission editor and hit Save. Then, add the Do Script File back into your mission pointing to the updated script and hit Save again. This should update the .miz file with your latest script. This has been a "thing" for a while now.

Posted

Thnx for your help

 

I found now an easier workaround because it's really painfull to regen the do script file action each time, instead now I created a "do script" action alone with a call to my script inside like

dofile([[c:\to\my\script.lua]])

This way I don't have to worry about saving the mission in the editor if I only have to modify my script, and this way I can quickly run the mission for testing.

And when I'll need share the mission I only have to include the script in a "do file script" action

  • Like 2
Posted

It has been an issue that is nearly impossible to narrow down the cause of it. The main problem being that I've never really been able to consistently reproduce it occurring and it seems to be random.

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

Posted
Thnx for your help

 

I found now an easier workaround because it's really painfull to regen the do script file action each time, instead now I created a "do script" action alone with a call to my script inside like

dofile([[c:\to\my\script.lua]])

This way I don't have to worry about saving the mission in the editor if I only have to modify my script, and this way I can quickly run the mission for testing.

And when I'll need share the mission I only have to include the script in a "do file script" action

 

Brilliant. Saves me much time testing.

  • Recently Browsing   0 members

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