Jump to content

Target Script Editor: compile errors


Lange_666

Recommended Posts

I'm standing in front of my next traffic light (orange, not red).

I'm searching for a list to better (or fully) understand the errors the compiler comes with.

Instead of adding the UI Layer macro's to my macrofile, i included 2 extra macro files i created out of the DCS controller setup --> Make HTML and convert with a Powershell script.

 

So i have 3 macro files included like this:

include "targetdx128.tmh" // DX120 button hack, original = target.tmh (i hate green on a light background...)

include "DCS_A-10C_Macros.ttm"

include "DCS_General_Macro.ttm"

include "DCS_UI_Layer_Macro.ttm"

 

The DCS_A-10C_Macros.ttm is my DCS controller setup for the A-10C.

The DCS_General_Macro.tmm is the one i created out of the General Control settings and DCS_UILayer_Macro.tmm the one form the UI_Layer in the DCS control setup (only needed for binding VR Zooms and VR Reset View).

 

It compiles fine if i leave the DCS_General_Macro out (so it compiles the A-10C and UI_Layer fine) but when i add the General_Macro the compiler comes back with an error:

 

Compile Error:Identifier name expected in DCS_General_Macro.ttm at line 10.

 

However, i don't have anything different if i look into the 3 macro files so i have no clue what to look for.

If i // out line 10 i get the same error in line 11, if i // that one out i get the same error in line 28.

 

01 //**************************************************************************************************************

02 // DCS TARGET Macro File Generator - V1.6 - 02/08/2017

03 // DCS General - Generated 02/23/2020 10:35:02

04 //**************************************************************************************************************

05

06

07 // Communications **********************************************************************************************

08

09 define Communication_menu USB[0x31] // ""

10 define Switch_dialog L_SHIFT+USB[0x31] // "LShift - "

11 define Switch_to_main_menu L_CTL+USB[0x31] // "LCtrl - "

12

13 // Debug *******************************************************************************************************

14

15 define Restart_Mission L_SHIFT+USB[0x15] // "LShift - R"

16 define Toggle_Console L_ALT+USB[0x35] // "LAlt - `"

17

18 // General *****************************************************************************************************

19

20 define BDA_show_cursor L_ALT+L_CTL+USB[0x35] // "LAlt - LCtrl - `"

21 define BDA_show_hide R_ALT+USB[0x34] // "RAlt - '"

22 define Briefing_window L_ALT+USB[0x05] // "LAlt - B"

23 define Chat_show_hide L_CTL+L_SHIFT+USB[0x1C] // "LCtrl - LShift - Y"

24 define Control_panel USB[0x1C] // "Y"

25 define Coordinates_units_change L_ALT+USB[0x1C] // "LAlt - Y"

26 define End_mission USB[0x29] // "Esc"

27 define Force_cursor_to_show_on_off L_ALT+USB[0x06] // "LAlt - C"

28 define Frame_rate_counter_Service_info R_CTL+USB[0x48] // "RCtrl - Pause"

29 define Get_new_plane_respawn R_CTL+R_SHIFT+USB[0x2B] // "RCtrl - RShift - Tab"

30 define Info_bar_view_toggle L_CTL+USB[0x1C] // "LCtrl - Y"

31 define Jump_into_other_aircraft R_ALT+USB[0x0D] // "RAlt - J"

32 define Pause USB[0x48] // "Pause"

33 define Score_window USB[0x34] // "'"

34 define Screenshot USB[0x46] // "SysRQ"

35 define Show_debriefing_window R_SHIFT+USB[0x34] // "RShift - '"

36 define Show_Mission_Resources_Management_window L_ALT+USB[0x34] // "LAlt - '"

37 define Sound_On_Off L_CTL+USB[0x16] // "LCtrl - S"

38 define Time_accelerate L_CTL+USB[0x1D] // "LCtrl - Z"

39 define Time_decelerate L_ALT+USB[0x1D] // "LAlt - Z"

40 define Time_normal L_SHIFT+USB[0x1D] // "LShift - Z"

41

42 // Labels ******************************************************************************************************

43

44 define Aircraft_Labels L_SHIFT+USB[0x3B] // "LShift - F2"

45 define All_Labels L_SHIFT+USB[0x43] // "LShift - F10"

46 define Missile_Labels L_SHIFT+USB[0x3F] // "LShift - F6"

47 define Vehicle_Ship_Labels L_SHIFT+USB[0x42] // "LShift - F9"

48

49 // View ********************************************************************************************************

etc...

Also, if i change a few things and compile after each change, after a while i get a Define stack full error:

 

Compile Error Define stack full in DCS_General_Macro.ttm at line xx

I presume the compiler filled up it's define stack here but how do i get rid of it without closing and re-opening the Script Editor?

So i'm in the need of a bit of a decent error discription...


Edited by Lange_666

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind combat pedals, TrackIR4, Rift-S.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Link to comment
Share on other sites

I'm standing in front of my next traffic light (orange, not red).

I'm searching for a list to better (or fully) understand the errors the compiler comes with.

Instead of adding the UI Layer macro's to my macrofile, i included 2 extra macro files i created out of the DCS controller setup --> Make HTML and convert with a Powershell script.

 

So i have 3 macro files included like this:

include "targetdx128.tmh" // DX120 button hack, original = target.tmh (i hate green on a light background...)

include "DCS_A-10C_Macros.ttm"

include "DCS_General_Macro.ttm"

include "DCS_UI_Layer_Macro.ttm"

 

The DCS_A-10C_Macros.ttm is my DCS controller setup for the A-10C.

The DCS_General_Macro.tmm is the one i created out of the General Control settings and DCS_UILayer_Macro.tmm the one form the UI_Layer in the DCS control setup (only needed for binding VR Zooms and VR Reset View).

 

It compiles fine if i leave the DCS_General_Macro out (so it compiles the A-10C and UI_Layer fine) but when i add the General_Macro the compiler comes back with an error:

 

Compile Error:Identifier name expected in DCS_General_Macro.ttm at line 10.

 

However, i don't have anything different if i look into the 3 macro files so i have no clue what to look for.

If i // out line 10 i get the same error in line 11, if i // that one out i get the same error in line 28.

 

01 //**************************************************************************************************************

02 // DCS TARGET Macro File Generator - V1.6 - 02/08/2017

03 // DCS General - Generated 02/23/2020 10:35:02

04 //**************************************************************************************************************

05

06

07 // Communications **********************************************************************************************

08

09 define Communication_menu USB[0x31] // ""

10 define Switch_dialog L_SHIFT+USB[0x31] // "LShift - "

11 define Switch_to_main_menu L_CTL+USB[0x31] // "LCtrl - "

12

13 // Debug *******************************************************************************************************

14

15 define Restart_Mission L_SHIFT+USB[0x15] // "LShift - R"

16 define Toggle_Console L_ALT+USB[0x35] // "LAlt - `"

17

18 // General *****************************************************************************************************

19

20 define BDA_show_cursor L_ALT+L_CTL+USB[0x35] // "LAlt - LCtrl - `"

21 define BDA_show_hide R_ALT+USB[0x34] // "RAlt - '"

22 define Briefing_window L_ALT+USB[0x05] // "LAlt - B"

23 define Chat_show_hide L_CTL+L_SHIFT+USB[0x1C] // "LCtrl - LShift - Y"

24 define Control_panel USB[0x1C] // "Y"

25 define Coordinates_units_change L_ALT+USB[0x1C] // "LAlt - Y"

26 define End_mission USB[0x29] // "Esc"

27 define Force_cursor_to_show_on_off L_ALT+USB[0x06] // "LAlt - C"

28 define Frame_rate_counter_Service_info R_CTL+USB[0x48] // "RCtrl - Pause"

29 define Get_new_plane_respawn R_CTL+R_SHIFT+USB[0x2B] // "RCtrl - RShift - Tab"

30 define Info_bar_view_toggle L_CTL+USB[0x1C] // "LCtrl - Y"

31 define Jump_into_other_aircraft R_ALT+USB[0x0D] // "RAlt - J"

32 define Pause USB[0x48] // "Pause"

33 define Score_window USB[0x34] // "'"

34 define Screenshot USB[0x46] // "SysRQ"

35 define Show_debriefing_window R_SHIFT+USB[0x34] // "RShift - '"

36 define Show_Mission_Resources_Management_window L_ALT+USB[0x34] // "LAlt - '"

37 define Sound_On_Off L_CTL+USB[0x16] // "LCtrl - S"

38 define Time_accelerate L_CTL+USB[0x1D] // "LCtrl - Z"

39 define Time_decelerate L_ALT+USB[0x1D] // "LAlt - Z"

40 define Time_normal L_SHIFT+USB[0x1D] // "LShift - Z"

41

42 // Labels ******************************************************************************************************

43

44 define Aircraft_Labels L_SHIFT+USB[0x3B] // "LShift - F2"

45 define All_Labels L_SHIFT+USB[0x43] // "LShift - F10"

46 define Missile_Labels L_SHIFT+USB[0x3F] // "LShift - F6"

47 define Vehicle_Ship_Labels L_SHIFT+USB[0x42] // "LShift - F9"

48

49 // View ********************************************************************************************************

etc...

Also, if i change a few things and compile after each change, after a while i get a Define stack full error:

 

Compile Error Define stack full in DCS_General_Macro.ttm at line xx

I presume the compiler filled up it's define stack here but how do i get rid of it without closing and re-opening the Script Editor?

So i'm in the need of a bit of a decent error discription...

 

 

I belive the Problem is a Macro name (or several) beeing repeated in the second .ttm file.

Link to comment
Share on other sites

I thought of that but then the message "Identifier name expected" got me confused so i let loose of my first thought.

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind combat pedals, TrackIR4, Rift-S.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Link to comment
Share on other sites

Did you solve this one?

 

Sometimes an error occurs several lines below the actual cause of the error. When you say you commented out line 10 and the error just moved to line 11, then line 28 - that is a perfect example where the error is several lines before the spot TARGET calls as the error line. I would need to see DCS_A-10C_Macros.ttm to maybe confirm this.

 

If you aren't aware, the include statement takes the included file and literally places the contents of that file in your main file at the location of the include statement, and then passes the single "file" to the compiler. So it is possible that an error at the beginning of one .ttm file could be the result of a parsing issue from the end of the previous file.

 

But on this one, I agree with lxsapper. It is probably because you have duplicate defined names because of how you used DCS TARGET Macro File Generator. But the error is a little cryptic on that. I haven't seen that error before.

Link to comment
Share on other sites

Solved by removing the DCS_General_Macro.ttm as it contained doubles which i already had in the "DCS_A-10C_Macros.ttm file. The Identifier name expected error put me on the wrong leg so to speak.

 

I copied those that are not double over to the A-10C macro file although i could have removed them also in the A-10C macro file and leave the General one alone. Since then the Compile Error Define stack full hasn't roared it's ugly head either. So for the moment i consider this solved.

I'm also thinking of removing all unnecessary macro's since i don't use most of them anyway (and they never get filled with keyboard actions either) but then that's almost as big as a job as typing only those in i really need (now i use a script to extract them from the default keyboard.lua which then comes up with everything).

A decent overview of possible errors and it's solutions would be nice to move a bit quicker forward.

 

 

 


Edited by Lange_666

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind combat pedals, TrackIR4, Rift-S.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Link to comment
Share on other sites

Sounds good. Glad you got it figured out. Like I said, you'll be an expert by the end of the year.

 

Ya, I always type all the keyboard commands in for new DCS aircraft. But that is also because I tend to add stuff as I decide how I want to map things, so the time consuming part isn't typing all the commands. It is deciding how I want to map stuff to the controller. But I have a core set of commands that I use for all aircraft of course, which saves a lot of typing. I end up only having to add 20 to 40 new defines for new aircraft.

Link to comment
Share on other sites

I tend to set up my controllers as much as the same for every aircraft as i can.

But because DCS has the habbit to use slightly different function names per aircraft sometimes this can also get messy. I was a happy man when someone made the effort to autogenerate the macro's out of the keyboard.lua's.

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind combat pedals, TrackIR4, Rift-S.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Link to comment
Share on other sites

  • 9 months later...

Thx for the heads up.

After the macrogenerator has done it's job, i check the result and remove everything i don't need.

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind combat pedals, TrackIR4, Rift-S.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Link to comment
Share on other sites

Just curious, can you drop me your files so i can have a look (no expert but just curious). I'll PM contact info.

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind combat pedals, TrackIR4, Rift-S.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Link to comment
Share on other sites

There's a macro "Communication_menu" in both VR.tmm and TD_AJS37_Macro.tmm which causes the "Define Stack Error".

If i comment one of them out, the script runs.


Edited by Lange_666

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind combat pedals, TrackIR4, Rift-S.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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