need help with conflicting script and not compiler

GPC1 script programming for Titan One. Code examples, questions, requests.

need help with conflicting script and not compiler

Postby Jas8585 » Wed Nov 21, 2018 5:53 am

Hi can some one help me having problem with this script working as all 3 scripts have RB in it and RB is to activate one as well
and i cont get it to compiler now as well thanks

Code: Select all
 
 
main {
 
 
    // If I press RB runs combo 1
    if(event_press(XB1_RB)) {
        combo_run(Combo1);
    }
 
    // If I press X runs combo 2
    if(event_press(XB1_X)) {
        combo_run(Combo2);
    }
 
    // If I press A runs combo 3
    if(event_press(XB1_P3)) {
        combo_run(Combo3);
    }
 
    // If I press B run combo 4
    if(event_press(XB1_Y)) {
        combo_run(Combo4);
    }
 
    // If I press B run combo 5
    if(event_press(XB1_LB)) {
        combo_run(Combo5)
 
    }
 
    // If I press B run combo 6
    if(event_press(XB1_LT)) {
        combo_run(Combo6)
}
 
 combo Combo1 {
  set_val(XB1_RB, 100);
    wait(20);
    set_val(XB1_RB, 100);
    set_val(XB1_X, 100);
    wait(220);
    set_val(XB1_RB, 0);
    set_val(XB1_X, 0);
    wait(189);
    set_val(XB1_X, 100);
    wait(250);
    set_val(XB1_X, 0);
}
 
combo Combo2 {
  set_val(XB1_RB, 100);
    wait(20);
    set_val(XB1_RB, 100);
    set_val(XB1_X, 100);
    wait(180);
    set_val(XB1_RB, 0);
    set_val(XB1_X, 0);
    wait(189);
    set_val(XB1_X, 100);
    wait(250);
    set_val(XB1_X, 0);
}
 
combo Combo3 {
    set_val(XB1_RB, 100);
    set_val(XB1_A, 100);
    wait(770);
    set_val(XB1_RB, 0);
    set_val(XB1_A, 0);
}
 
combo Combo4 {
    //
    // combo code here
    //
}
 
combo Combo5 {
    //
    // combo code here
    //
}
 
combo Combo6 {
    //
    // combo code here
    //
}
User avatar
Jas8585
Sergeant First Class
Sergeant First Class
 
Posts: 19
Joined: Thu Feb 16, 2017 9:40 pm

Re: need help with conflicting script and not compiler

Postby Sillyasskid » Wed Nov 21, 2018 6:27 am

missing ' ; ' after last two combo runs
User avatar
Sillyasskid
Captain
Captain
 
Posts: 574
Joined: Sat May 14, 2016 3:07 am

Re: need help with conflicting script and not compiler

Postby Jas8585 » Wed Nov 21, 2018 10:10 am

hi I have put them in still getting

------ GPC: Build started ------

> 2: fif 19 all in one timed.gpc* : C:\Users\jas85\Documents\fif 19 all in one timed.gpc
> ERROR line 37: syntax error near unexpected token 'combo'.
Build failed with 1 errors ...

how do i fix the conflicting as when i press XBI_P3 it trys to run combo one fist be for running combo 3
thanks for help

Code: Select all
 
 
main {
 
 
    // If I press RB runs combo 1
    if(event_press(XB1_RB)) {
        combo_run(Combo1);
    }
 
    // If I press X runs combo 2
    if(event_press(XB1_X)) {
        combo_run(Combo2);
    }
 
    // If I press A runs combo 3
    if(event_press(XB1_P3)) {
        combo_run(Combo3);
    }
 
    // If I press B run combo 4
    if(event_press(XB1_Y)) {
        combo_run(Combo4);
    }
 
    // If I press B run combo 5
    if(event_press(XB1_LB)) {
        combo_run(Combo5);
 
    }
 
    // If I press B run combo 6
    if(event_press(XB1_LT)) {
        combo_run(Combo6);
}
 
 combo Combo1 {
  set_val(XB1_RB, 100);
    wait(20);
    set_val(XB1_RB, 100);
    set_val(XB1_X, 100);
    wait(220);
    set_val(XB1_RB, 0);
    set_val(XB1_X, 0);
    wait(189);
    set_val(XB1_X, 100);
    wait(250);
    set_val(XB1_X, 0);
}
 
combo Combo2 {
  set_val(XB1_RB, 100);
    wait(20);
    set_val(XB1_RB, 100);
    set_val(XB1_X, 100);
    wait(180);
    set_val(XB1_RB, 0);
    set_val(XB1_X, 0);
    wait(189);
    set_val(XB1_X, 100);
    wait(250);
    set_val(XB1_X, 0);
}
 
combo Combo3 {
    set_val(XB1_RB, 100);
    set_val(XB1_A, 100);
    wait(770);
    set_val(XB1_RB, 0);
    set_val(XB1_A, 0);
}
 
combo Combo4 {
    //
    // combo code here
    //
}
 
combo Combo5 {
    //
    // combo code here
    //
}
 
combo Combo6 {
    //
    // combo code here
    //
}
User avatar
Jas8585
Sergeant First Class
Sergeant First Class
 
Posts: 19
Joined: Thu Feb 16, 2017 9:40 pm

Re: need help with conflicting script and not compiler

Postby Scachi » Wed Nov 21, 2018 10:42 am

You are missing a } right after your line
combo_run(Combo6);
}
or you are not closing the main loop.

Here it is fixed:
Code: Select all
 
 
main {
 
 
    // If I press RB runs combo 1
    if(event_press(XB1_RB)) {
        combo_run(Combo1);
    }
 
    // If I press X runs combo 2
    if(event_press(XB1_X)) {
        combo_run(Combo2);
    }
 
    // If I press A runs combo 3
    if(event_press(XB1_P3)) {
        combo_run(Combo3);
    }
 
    // If I press B run combo 4
    if(event_press(XB1_Y)) {
        combo_run(Combo4);
    }
 
    // If I press B run combo 5
    if(event_press(XB1_LB)) {
        combo_run(Combo5);
 
    }
 
    // If I press B run combo 6
    if(event_press(XB1_LT)) {
        combo_run(Combo6);
    }
}
 
 
 combo Combo1 {
  set_val(XB1_RB, 100);
    wait(20);
    set_val(XB1_RB, 100);
    set_val(XB1_X, 100);
    wait(220);
    set_val(XB1_RB, 0);
    set_val(XB1_X, 0);
    wait(189);
    set_val(XB1_X, 100);
    wait(250);
    set_val(XB1_X, 0);
}
 
combo Combo2 {
  set_val(XB1_RB, 100);
    wait(20);
    set_val(XB1_RB, 100);
    set_val(XB1_X, 100);
    wait(180);
    set_val(XB1_RB, 0);
    set_val(XB1_X, 0);
    wait(189);
    set_val(XB1_X, 100);
    wait(250);
    set_val(XB1_X, 0);
}
 
combo Combo3 {
    set_val(XB1_RB, 100);
    set_val(XB1_A, 100);
    wait(770);
    set_val(XB1_RB, 0);
    set_val(XB1_A, 0);
}
 
combo Combo4 {
    //
    // combo code here
    //
}
 
combo Combo5 {
    //
    // combo code here
    //
}
 
combo Combo6 {
    //
    // combo code here
    //
}


For the paddle problem, did you check the device monitor to see if the press of that paddle does press both buttons ?
YOu may need to remove the paddle mapping via the xbox app.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 42 guests