Forums » Technology » Flight Sim Controllers » T.A.R.G.E.T. (Thrustmaster) » Exclude reports an error Active Topics You are not logged in. [Log In] [Register User]
Topic Options
Rate This Topic
Hop to:
#3157662 - 12/15/10 12:11 PM Exclude reports an error
Shadow=ASP= Offline
Member

Registered: 03/04/05
Posts: 1116
Loc: Ski, Norway
I cant seem to get Exclude to work right.
I have this in my .tmc:
Code:
Exclude(&LMFD);
Exclude(&RMFD);

When I try to run the script I get this error:
Code:
Runtime Error: Bad alias in main ( line 6 in WH_DCS_A10C_.tmc )


All I want to do is to exclude the two MFDs from the combined controller so they can work in directx mode (native) in DCS A-10C.
_________________________
LB2 Mission-pack 1

Top
#3157717 - 12/15/10 01:11 PM Re: Exclude reports an error [Re: Shadow=ASP=]
Dimebug Offline
Member

Registered: 09/18/10
Posts: 103
Loc: France
this works well here. Maybe the the message isn't driving you in the right direction.

include "target.tmh"
int main()
{
Exclude(&HCougar);
Exclude(&T16000);
Exclude(&LMFD);
Exclude(&RMFD);
if(Init(&EventHandle)) return 1;



}
int EventHandle(int type, alias o, int x)
{
DefaultMapping(&o, x);
}
_________________________
Guillaume "Dimebug" Leleve

Top
#3157741 - 12/15/10 01:38 PM Re: Exclude reports an error [Re: Dimebug]
Shadow=ASP= Offline
Member

Registered: 03/04/05
Posts: 1116
Loc: Ski, Norway
This is the entire file. It stops at line 5 which is its supposed to exclude the Cougar. If I comment out that line it stop at the next.

include "target.tmh"
include "DCS A-10C macro.ttm"
int main()
{
Exclude(&HCougar);
Exclude(&T16000);
Exclude(&LMFD);
Exclude(&RMFD);

if(Init(&EventHandle)) return 1;

MapAxis(&Joystick, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Joystick, JOYX, 0, 0, 0, 0, 0);
MapAxis(&Joystick, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Joystick, JOYY, 0, 0, 0, 0, 0);
MapAxis(&Throttle, SCX, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, SCX, 0, 0, 0, 0, 0);
MapAxis(&Throttle, SCY, DX_YROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, SCY, 0, 0, 0, 0, 0);
MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, THR_RIGHT, 0, 0, 0, 0, 0);
MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, THR_LEFT, 0, 0, 0, 0, 0);
MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS, AXIS_NORMAL, MAP_ABSOLUTE);
SetSCurve(&Throttle, THR_FC, 0, 0, 0, 0, 0);

SetKBRate(25, 33);
SetKBLayout(KB_ENG);
SetShiftButton(&Joystick, S3, &Throttle, PSF, PSB, 0);

MapKeyIOUMD(&Joystick, TG1, 0, 0, 'p', 'p', 0, 0);
MapKeyIOUMD(&Joystick, S1, 0, 0, 'm', 'm', 0, 0);
MapKeyIOUMD(&Joystick, TG2, 0, 0, SPC, SPC, 0, 0);
MapKeyIOUMD(&Joystick, H1U, L_CTL+'t', R_CTL+';', L_CTL+'t', R_CTL+';', L_CTL+'t', R_CTL+';');
MapKeyIOUMD(&Joystick, H1D, 0, R_CTL+'.', 0, R_CTL+'.', 0, R_CTL+'.');
MapKeyIOUMD(&Joystick, H1L, R_CTL+',', R_CTL+',', R_CTL+',', R_CTL+',', R_CTL+',', R_CTL+',');
MapKeyIOUMD(&Joystick, H1R, R_CTL+'/', R_CTL+'/', R_CTL+'/', R_CTL+'/', R_CTL+'/', R_CTL+'/');

MapKeyIOUMD(&Throttle, IDLEROFF, PULSE+R_CTL+END, PULSE+R_CTL+END, PULSE+R_CTL+END, PULSE+R_CTL+END, PULSE+R_CTL+END, PULSE+R_CTL+END);
MapKeyRIOUMD(&Throttle, IDLEROFF, PULSE+R_CTL+HOME, PULSE+R_CTL+HOME, PULSE+R_CTL+HOME, PULSE+R_CTL+HOME, PULSE+R_CTL+HOME, PULSE+R_CTL+HOME);
MapKeyIOUMD(&Throttle, IDLELOFF, PULSE+R_ALT+END, PULSE+R_ALT+END, PULSE+R_ALT+END, PULSE+R_ALT+END, PULSE+R_ALT+END, PULSE+R_ALT+END);
MapKeyRIOUMD(&Throttle, IDLELOFF, PULSE+R_ALT+HOME, PULSE+R_ALT+HOME, PULSE+R_ALT+HOME, PULSE+R_ALT+HOME, PULSE+R_ALT+HOME, PULSE+R_ALT+HOME);


}
int EventHandle(int type, alias o, int x)
{
DefaultMapping(&o, x);
}
_________________________
LB2 Mission-pack 1

Top
#3157849 - 12/15/10 03:41 PM Re: Exclude reports an error [Re: Shadow=ASP=]
Teej Offline
Member

Registered: 07/02/05
Posts: 1503
Interesting. That script runs perfectly on my machine if I comment out the DCS macro line since I have no such file. :P

I don't have my Cougar plugged in, though.
_________________________
Virtual Thunderbirds, LLC | Sponsored by Thrustmaster

Top
#3157898 - 12/15/10 04:36 PM Re: Exclude reports an error [Re: Shadow=ASP=]
Teej Offline
Member

Registered: 07/02/05
Posts: 1503
To be thorough...I installed Cougar drivers and had my Cougar plugged in...I could include/exclude it in the gui, and again, your script above worked fine (with, again, commenting out the DCS macro line)
_________________________
Virtual Thunderbirds, LLC | Sponsored by Thrustmaster

Top
#3158222 - 12/16/10 03:59 AM Re: Exclude reports an error [Re: Teej]
Shadow=ASP= Offline
Member

Registered: 03/04/05
Posts: 1116
Loc: Ski, Norway
I uninstalled my Cougar a few days ago (when the Simped arrived). Both MFDs show up green along with the Warthog, the Cougar and the T1600 is yellow in the GUI editor.
I might have edited Target.tmh a while back when experimenting with setting up unsupported USB devices. If someone can post the content of target.tmh here that would be greatly appreciated and save me some time comparing the different revisions.
_________________________
LB2 Mission-pack 1

Top
#3158405 - 12/16/10 10:31 AM Re: Exclude reports an error [Re: Shadow=ASP=]
Shadow=ASP= Offline
Member

Registered: 03/04/05
Posts: 1116
Loc: Ski, Norway
Solved!

I overwrote my target.tmh in my profiles directory with the one that came with the Target-suite. It appears line 6 and 7 were missing USB ids for the devicenames.
_________________________
LB2 Mission-pack 1

Top
Topic Options
Rate This Topic
Hop to:

Moderator:  EinsteinEP, RacerGT 
 
Quick Search
Recent Articles
Support SimHQ
.
Social


Recent Topics
SimHQ - SciFi Sunday (September 21, 2014)
by THX-1138
Yesterday at 11:51 PM
Good Sunday session today
by adlabs6
Yesterday at 10:45 PM
Music....
by adlabs6
Yesterday at 10:36 PM
ground handling and take-off
by ru_disa
Yesterday at 10:25 PM
a good iPhone 6 vs GalaxyS5 comparison
by piper
Yesterday at 03:59 PM
For Sale NVIDIA GTX 780 2304 CUDA Cores 967 MHz Base Clock 1020 MHz Boost Clock 185.6GT/s Texture Fill Rate Memory 3072
by H1TMAN_ACTUA1
Yesterday at 03:32 PM
New Oculus Rift Prototype - Enter Crescent Bay
by komemiute
Yesterday at 03:22 PM
I Remember When Our House Phone (land-line) Bill Was $20-30/Month ....Now Its $177.00/Month
by Haggart
Yesterday at 02:52 PM
[SH4] Operation Monsun
by DBond
Yesterday at 02:33 PM
A2A Spitfire Art Donahue uploaded
by Tom_Weiss
Yesterday at 12:57 PM
 

Forum Use Agreement | Privacy Statement
Copyright 1997-2014, SimHQ Inc. All Rights Reserved.