Please help me fix this script.. Error
Posted: 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 ...
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);
}