Jump to content

Recommended Posts

Posted

Anyone want to take this on. Probably easy for someone with Mission editor knowledge. So I am flying the OPStarvation mission and I get the following Mission Script Error

 

[string "trigger.SetUserFlag(3,True)"]:1:attempt to call field 'set UserFlag ' (a nil value) Stack Trace back:

 

[c] : in function ' set UserFlag ' [string " trigger.set UserFlag (3, true)" ] :1: in main chunck

 

It will clear for a few seconds and it happens again the only difference is that the script error reads the same except where the number 3 is it is replaced by number 4.

 

If someone has the knowledge to correct this or tell me what I need to do I would appreciate it very much. Thanks in advance

Posted

Thank you for the reply ajax but I don't know the first place to look to change this. Can you elaborate for someone that hasn't gotten that deep into the mechanics of it all yet.

Posted

Basically, what I am saying is that there is an error in the script based on the error message. (Obviously, right? :)) Is it one you created yourself, one you downloaded, or one built into the mission?

 

If you are comfortable doing so, you can edit the script yourself; but it would be better for the author make the change.

 

The error message says 'trigger.SetUserFlag(3,True)'. If the script is written like that then you will get this error. The reason is that it should be 'trigger.action.setUserFlag('3',true)'.

 

There is more than one problem with the script statement. (1) The Lua programming language is case sensitive so 'SetUserFlag' will not work -- it needs a lower case 's' in 'Set'. (2) This function requires that the flag number is sent as a string, that is as text not a number. So the 3 needs to be enclosed in quotes, like this: '3' . (Note that either single or double quotes will work.) (3) It looks like maybe a space was inserted between 'Set' and 'UserFlag', too. If so, it needs to be removed.

 

I hope this helps.

Posted

Thanks for all the info. No I did not make the mission I downloaded it off of the DCS website. I had a whole different idea as to how missions were built using the mission editor but you have shown me that it takes a lot more than just clicking on commands within the editor. I will see if I can contact the author and see if he is willing to fix it. Thanks again for you in depth knowledge.

Posted

Well that's unfortunate the author Jus2410 is not listed in the DCS forum members list so I guess the mission stays broken. Too bad it seemed like a cool mission with 4 AI jets flying Cap and SEAD for you. But never got far enough to really find out how well it worked. It was built in an earlier version of DCS world with 1024 downloads but probably isn't compatable with 1.2.8. Thanks again

Posted (edited)

I just downloaded the OP Starvation mission from the ED site. There are no scripts in that mission.

 

I think maybe you are seeing a version mismatch problem. Unfortunately, with these older missions you sometimes have to rebuild them from scratch to get them to work in the newer versions of DCS World.

Edited by ajax
  • Like 1
Posted

I just hate when something bugs me. I figured that if the sim was stopping and showing me the mission script error that it must be commanded from somewhere within the Mission Editor and thanks to you for showing me how the script should have been written I was able to not only find the two instances of it but I also corrected as you described. Flew the mission with no stops or errors. Thank you again for your help. Wish I could give more Rep.

  • Recently Browsing   0 members

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