Cant find this syntax error
6 posts
• Page 1 of 1
Cant find this syntax error
Hi fellow GPC2 script writes. I just got my Titan 2 and wanted to code some simple combos, that keep repeating doing the same action until pressing one button to disable the looping combo.
After I added the second combo, Gtuner didn't want to compile the main functions anymore. It was working perfect before I add the second combo.... I am now always getting this error if I try to compile
I dont know whats wrong at this script, now.
After I added the second combo, Gtuner didn't want to compile the main functions anymore. It was working perfect before I add the second combo.... I am now always getting this error if I try to compile
I dont know whats wrong at this script, now.
GPC error: test1.gpc(3): syntax error, unexpected COMBORUN, expecting C 'combo_run'.
- Code: Select all
#pragma METAINFO("BlackOps 4 Helper", 0, 1, "")
main {
if (event_active(BUTTON_3) && (event_active(BUTTON_10)) combo_run(cDivinium);
if (event_active(BUTTON_3) && (event_active(BUTTON_11)) combo_run(cMesser);
if (event_active(BUTTON_9)) combo_stop(cDivinium);
if (event_active(BUTTON_9)) combo_stop(cMesser);
}
combo cDivinium {
wait(2000);
wait(2000);
wait(1000);
set_val(BUTTON_16,100);
wait(200);
set_val(BUTTON_16,0);
wait(200);
combo_restart(cDivinium);
wait(10);
}
combo cMesser {
wait(900);
set_val(BUTTON_15,100);
wait(200);
set_val(BUTTON_15,0);
wait(100);
combo_restart(cMesser);
wait(10);
}
-
GameOne - Private First Class
- Posts: 3
- Joined: Wed Nov 28, 2018 4:42 pm
Re: Cant find this syntax error
To many ( or to less ) :
->
same to do for the other line
two "event_active" are hard to trigger at the same time by hand (same millisecond)
This will only work if you are using mappings via Input Translator/XIM or code.
Give this one a try:
hold down BUTTON_3 and press 10 or 11 to start the combo you want.
- Code: Select all
if (event_active(BUTTON_3) && (event_active(BUTTON_10)) combo_run(cDivinium);
->
- Code: Select all
if (event_active(BUTTON_3) && event_active(BUTTON_10)) combo_run(cDivinium);
same to do for the other line
two "event_active" are hard to trigger at the same time by hand (same millisecond)
This will only work if you are using mappings via Input Translator/XIM or code.
Give this one a try:
hold down BUTTON_3 and press 10 or 11 to start the combo you want.
- Code: Select all
#pragma METAINFO("BlackOps 4 Helper", 0, 1, "")
main {
if (get_actual(BUTTON_3) && event_active(BUTTON_10)) combo_run(cDivinium);
if (get_actual(BUTTON_3) && event_active(BUTTON_11)) combo_run(cMesser);
if (event_active(BUTTON_9)) combo_stop(cDivinium);
if (event_active(BUTTON_9)) combo_stop(cMesser);
}
combo cDivinium {
wait(2000);
wait(2000);
wait(1000);
set_val(BUTTON_16,100);
wait(200);
set_val(BUTTON_16,0);
wait(200);
combo_restart(cDivinium);
wait(10);
}
combo cMesser {
wait(900);
set_val(BUTTON_15,100);
wait(200);
set_val(BUTTON_15,0);
wait(100);
combo_restart(cMesser);
wait(10);
}
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Cant find this syntax error
Issue is here. delete those brackets, and it will compile,
Scachi is right about having to event_active()'s together. If your nor using a xim, or input translator, then you might want to change that code to something easier to trigger with a controller,
something like
(is_active(BUTTON_3) && event_active(BUTTON_10))
could work.
-
Sillyasskid - Captain
- Posts: 574
- Joined: Sat May 14, 2016 3:07 am
Re: Cant find this syntax error
Thanks guys
The first combo cDivinium is working perfectly, also the button to abort it. No issues at running this one.
But, the second one cMesser (although its almost similar as the first combo) does crash my Titan2 after it ran and restarted the combo 2 times activating the combo, it does directly reboot and reconnect to the PROG-interface
Its nearly identical to the first combo (beside other button being allocated and the timing).
I am using the firmware that came out today (v0.98.1.70), using this GPC
Don't know what the crash does trigger, on the second combo
EDIT: Sometimes the combo cMesser can run up to 4 times before the Titan2 does crash and reboot. Tried out Test & Debug + different memory slots.
The first combo cDivinium is working perfectly, also the button to abort it. No issues at running this one.
But, the second one cMesser (although its almost similar as the first combo) does crash my Titan2 after it ran and restarted the combo 2 times activating the combo, it does directly reboot and reconnect to the PROG-interface
Its nearly identical to the first combo (beside other button being allocated and the timing).
I am using the firmware that came out today (v0.98.1.70), using this GPC
- Code: Select all
#pragma METAINFO("BlackOps 4 Helper", 0, 2, "")
main {
if (get_actual(BUTTON_3) && event_active(BUTTON_10)) combo_run(cDivinium);
if (get_actual(BUTTON_3) && event_active(BUTTON_11)) combo_run(cMesser);
if (event_active(BUTTON_9)) combo_stop(cDivinium);
if (event_active(BUTTON_9)) combo_stop(cMesser);
}
combo cDivinium {
wait(2000);
wait(2000);
wait(1000);
set_val(BUTTON_16,100);
wait(200);
set_val(BUTTON_16,0);
wait(200);
combo_restart(cDivinium);
wait(10);
}
combo cMesser {
wait(700);
set_val(BUTTON_15,100);
wait(200);
set_val(BUTTON_15,0);
wait(100);
combo_restart(cMesser);
wait(10);
}
Don't know what the crash does trigger, on the second combo
EDIT: Sometimes the combo cMesser can run up to 4 times before the Titan2 does crash and reboot. Tried out Test & Debug + different memory slots.
Last edited by GameOne on Sat Dec 01, 2018 3:15 pm, edited 1 time in total.
-
GameOne - Private First Class
- Posts: 3
- Joined: Wed Nov 28, 2018 4:42 pm
Re: Cant find this syntax error
Issue was with the last wait, being 10ms.
Fixed
Should only be used with the titan one.
Fixed
- Code: Select all
combo cMesser {
wait(700);
set_val(BUTTON_15,100);
wait(200);
set_val(BUTTON_15,0);
wait(100);
combo_restart(cMesser);
wait(0);
}
- Code: Select all
combo_restart(cMesser);
wait(10);
Should only be used with the titan one.
-
Sillyasskid - Captain
- Posts: 574
- Joined: Sat May 14, 2016 3:07 am
Re: Cant find this syntax error
Sillyasskid wrote:Issue was with the last wait, being 10ms.
Fixed
- Code: Select all
combo cMesser {
wait(700);
set_val(BUTTON_15,100);
wait(200);
set_val(BUTTON_15,0);
wait(100);
combo_restart(cMesser);
wait(0);
}
- Code: Select all
combo_restart(cMesser);
wait(10);
Should only be used with the titan one.
Thank you so much
Its working
-
GameOne - Private First Class
- Posts: 3
- Joined: Wed Nov 28, 2018 4:42 pm
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 206 guests