Please help fix this error

GPC script programming for Titan One device. Code examples, how to, questions, requests.

Moderators: The_Rabid_Taco, pablosscripts, bonefisher, Baby Cham, Elvish

Please help fix this error

Postby Titanzz123 » Wed Mar 13, 2019 12:13 am

I am getting this error and i need help fixing this, thanks!

> ERROR line 7: syntax error near unexpected token 'const'.
Build failed with 1 errors ...

Code: Select all
const uint8 cmap[39]={8|0x01,
  0, 1, 2, 6, 7, 8, 3, 4, 5, 9, 13, 16, 12, 10, 29, 20, 11, 17, 18, 19, 15, 23,
  24, 21, 22, 25, 26, 27, 28, 14, 30, 31, 32, 33, 34, 35, 36, 37,
};
init{
  remapper(cmap);
}
main {
  set_val(BUTTON_16, get_actual(BUTTON_21));
  set_val(BUTTON_15, get_actual(29));
 
  if (is_release(BUTTON_21) && is_active(BUTTON_16)){
    set_val(BUTTON_16, 0);
    set_val(BUTTON_3, get_actual(BUTTON_16));
  }
  else if (is_active(BUTTON_21) && is_active(BUTTON_16)){
    set_val(BUTTON_3, get_actual(BUTTON_16));
  }
 
  if(is_release(29) && is_active(BUTTON_15)){
    set_val(BUTTON_15, 0);
    set_val(BUTTON_2, get_actual(BUTTON_15));
  }
  else if(is_active(29) && is_active(BUTTON_15)){
    set_val(BUTTON_2, get_actual(BUTTON_15));
  }
}
if (check_active(BUTTON_6, 250)) {
        combo_run(cRight_stick_spam);
    }
    if (is_release(BUTTON_14) && is_release(BUTTON_5) && event_active(BUTTON_15)) {
        combo_run(cLong_shell);
    }
        else if (event_release(BUTTON_15)) {
            combo_stop(cLong_shell);
    }
    combo Macro2Combo {
    set_val(BUTTON_5, 0.00);
    set_val(BUTTON_15, 0.00);
    wait(1140);
    set_val(BUTTON_5, 0.00);
    set_val(BUTTON_15, 100.00);
    wait(150);
    set_val(BUTTON_5, 0.00);
    set_val(BUTTON_15, 0.00);
    wait(2660);
    set_val(BUTTON_5, 0.00);
    set_val(BUTTON_15, 100.00);
    wait(150);
    set_val(BUTTON_5, 0.00);
    set_val(BUTTON_15, 0.00);
    wait(150);
    set_val(BUTTON_5, 0.00);
    set_val(BUTTON_15, 100.00);
    wait(1300);
    set_val(BUTTON_5, 0.00);
    set_val(BUTTON_15, 0.00);
    wait(150);
    set_val(BUTTON_5, 0.00);
    set_val(BUTTON_15, 100.00);
    wait(1300);
    set_val(BUTTON_5, 0.00);
    set_val(BUTTON_15, 0.00);
    wait(150);
    set_val(BUTTON_5, 0.00);
    set_val(BUTTON_15, 100.00);
    wait(1300);
    set_val(BUTTON_5, 0.00);
    set_val(BUTTON_15, 0.00);
    wait(150);
    set_val(BUTTON_5, 100.00);
    set_val(BUTTON_15, 100.00);
    wait(150);
    set_val(BUTTON_5, 0.00);
    set_val(BUTTON_15, 0.00);
    wait(150);
    set_val(BUTTON_5, 0.00);
    set_val(BUTTON_15, 100.00);
    wait(150);
    set_val(BUTTON_15, 0);
    wait(150);
    set_val(BUTTON_15,100);
    wait(1300);
    set_val(BUTTON_15, 0);
    wait(150);
......
User avatar
Titanzz123
Private
Private
 
Posts: 1
Joined: Sat Feb 16, 2019 3:51 pm

Re: Please help fix this error

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

This is a Titan Two script with some structures that are not compatible with the Titan One script language. What this is script is supposed to do? perhaps we can re-implement for the Titan One.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 16860
Joined: Tue Mar 18, 2014 1:39 pm


Return to GPC Script Programming (Titan One)

Who is online

Users browsing this forum: SirrapT and 12 guests