Jump to content

Recommended Posts

Posted

Hi,

 

per the Scripting Engine Introduction

There is an occasional bug that occurs when you attempt to update an already loaded file where the file is not actually updated. Its rare enough that the Do Script File is still viable, but that rarity can lead to frustration when it does occur.

I am experiencing this bug....

Very frustrating and time consuming indeed...

 

Yesterday I lost several hours looking for a bug in my Lua script until I realise that it was not updated correctly (I noticed that the debug text I was printing was not updated).

 

I must restart DCS each time (or maybe just the mission editor but didn't check yet) to take Lua function modifications into account :(

 

Does anyone know why this happens or things that might favor this bug ?

Does the directory where you put your Lua function has anything to do with this bug ?

Is it possible that I did something "bad" in my Lua script (although it is working as expected) ?

 

Thanks

Posted

Don't waste time to reset your script all the time. You can load the lua script dynamically from your mission by doing this:

 

Create a trigger when you want to start your script, and in the action section set it this way:

 

ACTION: DO SCRIPT

TEXT: dofile([[D:\DCS\Missions\Cold War Flight School\Mission 02 The Assessment\the_assessment_level_1.lua]])

 

I guess you understood that you need to point to your file.

 

BUT ... **IMPORTANT** ... when your mission is ready to be deployed and final, remove that call and replace it by the standard DO SCRIPT FILE call that you are already using. If not,if you share your mission it will not start since the target script file will not be at the same location on everyone`s PC. You get the idea ...

 

You will send me a beer, no more ****ing around with reloading script, save, update and all. You can now edit your script in and editor, save from the editor, than start your mission ...that's it.

  • Recently Browsing   0 members

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