Jump to content

Struggling with scripts


PapaSmoke

Recommended Posts

Hi all,

 

It's my first post here, I'm coming back to DCS after about a six year hiatus and much has changed. I have the A-10C, MiG-21 and Hawk modules and will be adding more soon.

 

I'm not a programmer, but I'm working on changing that slowly by trying to get stuck into scripts for DCS. My only programming knowledge comes from previously teaching myself to write some basic scripts for Arma, back in the day.

 

So, to the problem...

I'm trying to write a very basic script that will check that certain parameters (in this case the UHF frequency) are set correctly before carrying out an action. As a way of building towards this I've tried to create a basic script that will pull a cockpit parameter out of the sim and display it as part of a message.

 

In learning how to do that I've used the excellent tutorial at http://deadfrogstudios.com/warthogpit/index.php?title=Exporting_DCS_Data to set up my Export.lua file to send some parameters to an Export.log - I'm sure none of this is stretching anybody here, but it worked me over.

 

Anyway, I got it achieved, but when I tried to run the exact same code (in a different file - ExValues.lua) by using the Do Script File command in the ME, I get an error relating to the GetDevice(0).

 

Anybody fancy helping a complete coding novice figure this out? I'd really appreciate it. I've done my Due Diligence but I can't find anything on these forums or even Google that comes close. Here's hoping.

 

Blue skies,

 

PapaSmoke

  • Like 1
Link to comment
Share on other sites

Have also a look here:

 

http://flightcontrol-master.github.io/MOOSE/

 

It can be worth the investement for you ...

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

  • Recently Browsing   0 members

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