Please help me fix this script.. Error

Titan One general support. Questions, firmware update, feature request.

Please help me fix this script.. Error

Postby kiet510 » Tue Mar 12, 2019 6:40 pm

Can someone help me fix this script.. I get an error in line 79. > ERROR line 79: syntax error near unexpected token 'combo'.
Build failed with 1 errors ...


Code: Select all
 
 
int run_combo=0;int yachse;
int xachse;
int nachRechts;
int firstpress;
int shootpower=220;
int tempshotpower=220;
int finesseshootpower=210;
int lowdrivenshootpower=210;
int TimedFinesseWait=185;
int TimedFinesseShotpower=210;
int TimedLowDrivenFinesseShotpower=290;
int TimedLowDrivenWait=440;
int TimeForDoubleTap=300;
 
 
 
 
main {
if (get_val(XB1_RB) && get_val(XB1_LB)){firstpress=FALSE;} // LowDriven -> stop execute Skills set firstpress to FALSE
 
 
 
 
if (event_press(XB1_LB) && !firstpress) {combo_run(getsetDoppelklick);}else if (event_press(XB1_LB) && firstpress ){firstpress=FALSE;nachRechts=0;direction();combo_run(BodyFeint);}
 
 
 
 
if (event_press(XB1_RB) && !firstpress) {combo_run(getsetDoppelklick);}else if (event_press(XB1_RB) && firstpress ){firstpress=FALSE;nachRechts=1;direction();combo_run(BodyFeint);}
 
 
 
 
 
 
 
 
if (event_press(XB1_RS)) combo_run(jmxcmb);
}
 
 
 
 
 
 
combo BodyFeint {set_val(XB1_RY,xachse);set_val(XB1_RX,yachse);wait(80);set_val(XB1_LY,xachse);set_val(XB1_LX,yachse);wait(650);yachse = 0;xachse = 0;}
 
 
 
 
 
 
 
 
combo OptionLB {set_val(XB1_LB,100);wait(350);}
combo OptionRB {set_val(XB1_RB,100);wait(350);}
combo OptionLT {set_val(XB1_LT,100);wait(350);}
combo block_Btn {set_val(XB1_RB,0);set_val(XB1_LB,0);wait(300);}
combo block_Btn2 {set_val(XB1_RB,0);wait(300);}
combo getsetDoppelklick {firstpress=TRUE;wait(TimeForDoubleTap);firstpress=FALSE;}
function GetLXY () {xachse = get_val(XB1_LX);yachse = get_val(XB1_LY);}
function direction() {
xachse = get_val(XB1_LX);yachse = get_val(XB1_LY);
if((get_val(XB1_LX) >= 0) && (get_val(XB1_LY) >= 0))
{if (nachRechts > 0) {yachse = inv(yachse);}else {xachse = inv(xachse);}}
if((get_val(XB1_LX) <= 0) && (get_val(XB1_LY) >= 0))
{if (nachRechts > 0) {yachse = inv(yachse);}else {xachse = inv(xachse);}}
if((get_val(XB1_LX) <= 0) && (get_val(XB1_LY) <= 0))
{if (nachRechts > 0) {yachse = inv(yachse);}else {xachse = inv(xachse);}}
if((get_val(XB1_LX) >= 0) && (get_val(XB1_LY) <= 0))
{if (nachRechts > 0) {yachse = inv(yachse);}else {xachse = inv(xachse);}}
}
 
 
combo jmxcmb {
set_val(XB1_RB, 100);
set_val(XB1_LB, 100);
wait(20);
set_val(XB1_B, 100);
wait(200);
set_val(XB1_RB, 100);
set_val(XB1_LB, 100);
set_val(XB1_B, 0);
wait(200);
set_val(XB1_RB, 100);
set_val(XB1_LB, 100);
set_val(XB1_B, 100);
wait(200);
set_val(XB1_RB, 0);
set_val(XB1_LB, 100);
set_val(XB1_B, 0);
}
User avatar
kiet510
Command Sergeant Major
Command Sergeant Major
 
Posts: 164
Joined: Sat Jan 03, 2015 5:17 am

Re: Please help me fix this script.. Error

Postby Scachi » Thu Mar 14, 2019 6:22 am

I don't rember the exact order.. but for the T1 you can't mix combos and functions.

not sure if it is
combo
combo
combo
function
function
..

or
function
function
combo
combo
combo
...
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 2250
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Please help me fix this script.. Error

Postby J2Kbr » Thu Mar 14, 2019 7:02 am

data segment
variable declarations
init
main
combos
functions
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 18155
Joined: Tue Mar 18, 2014 1:39 pm


Return to Titan One Device

Who is online

Users browsing this forum: No registered users and 3 guests

cron