Please help fix one error.. thanks

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 one error.. thanks

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

> ERROR line 79: syntax error near unexpected token 'combo'.
Build failed with 1 errors ... I'm a t1 user but found this script on CM website.. Sorry I might have posted twice in gamepack support..

Code: Select all
//Posted : Tuesday 12th of March, 2019 18:26 UTC  
 
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 fix one error.. thanks

Postby UK_Wildcats_Fans » Tue Mar 12, 2019 9:42 pm

You needed to be put your last combo before the functions.

Code: Select all
//Posted : Tuesday 12th of March, 2019 18:26 UTC  
 
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;}
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);
}
 
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);}}
}
 
 
User avatar
UK_Wildcats_Fans
Brigadier General
Brigadier General
 
Posts: 2060
Joined: Thu Jan 08, 2015 6:53 pm
Location: San Diego, California USA

Re: Please help fix one error.. thanks

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

wat is this for ?
User avatar
exclaimeddavid
Sergeant First Class
Sergeant First Class
 
Posts: 17
Joined: Wed Aug 15, 2018 12:52 am

Re: Please help fix one error.. thanks

Postby kiet510 » Thu Mar 14, 2019 10:47 pm

This is for FIFA 19 shot and bodyfeint skill move
User avatar
kiet510
Command Sergeant Major
Command Sergeant Major
 
Posts: 164
Joined: Sat Jan 03, 2015 5:17 am

Re: Please help fix one error.. thanks

Postby kiet510 » Thu Mar 14, 2019 10:50 pm

Hello @WildCat or J2k,

For that script that you help me fixed.. This script from what I understand is to press LB/RB/B at the same time, that basically tells the script how long to hold down the 3 buttons, unfortunately I want more shot power.. do you know what values I need to change to make it hold down the 3 buttons a little longer for a stronger shot, this is FIFA 19.. It would be this part of the script..I'm guessing the parts that say "wait"? is that correct? Thanks for your help.

Code: Select all
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 fix one error.. thanks

Postby J2Kbr » Sat Mar 16, 2019 11:44 am

Possible is the wait time in this sequence:
Code: Select all
set_val(XB1_RB, 100);
set_val(XB1_LB, 100);
set_val(XB1_B, 100);
wait(200);

Try increase the number 200 for, for example, 300.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 16991
Joined: Tue Mar 18, 2014 1:39 pm


Return to GPC Script Programming (Titan One)

Who is online

Users browsing this forum: No registered users and 2 guests