GPC Language Reference Need a bit of help
5 posts
• Page 1 of 1
GPC Language Reference Need a bit of help
I am fixing a script from titan one to titan two i was at 153 errors i got it all knocked down but i am stuck here i do not know the new inputs for these errors
the Errors in the box are
GPC error: bob&kaz.gpc(12): Identifier not declared 'event_press'.
GPC error: bob&kaz.gpc(12): Illegal operation 'arg:1'.
GPC error: bob&kaz.gpc(12): Illegal function call, near ')'
GPC error: bob&kaz.gpc(14): Identifier not declared 'event_press'.
GPC error: bob&kaz.gpc(14): Illegal operation 'arg:1'.
GPC error: bob&kaz.gpc(14): Illegal function call, near ')'
GPC error: bob&kaz.gpc(17): Identifier not declared 'PS4_RX'.
GPC error: bob&kaz.gpc(17): Illegal operation 'get_val'.
GPC error: bob&kaz.gpc(17): Illegal operation '<='.
GPC error: bob&kaz.gpc(20): Identifier not declared 'PS4_RX'.
GPC error: bob&kaz.gpc(20): Illegal operation 'get_val'.
GPC error: bob&kaz.gpc(20): Illegal operation '>='.
GPC error: bob&kaz.gpc(37): Identifier not declared 'event_press'.
GPC error: bob&kaz.gpc(37): Illegal operation 'arg:1'.
GPC error: bob&kaz.gpc(37): Illegal function call, near ')'
GPC error: bob&kaz.gpc(43): Identifier not declared 'event_press'.
GPC error: bob&kaz.gpc(43): Illegal operation 'arg:1'.
GPC error: bob&kaz.gpc(43): Illegal function call, near ')'
GPC error: bob&kaz.gpc(46): Identifier not declared 'event_press'.
GPC error: bob&kaz.gpc(46): Illegal operation 'arg:1'.
GPC error: bob&kaz.gpc(46): Illegal function call, near ')'
GPC error: bob&kaz.gpc(52): Identifier not declared 'event_press'.
GPC error: bob&kaz.gpc(52): Illegal operation 'arg:1'.
GPC error: bob&kaz.gpc(52): Illegal function call, near ')'
GPC error: bob&kaz.gpc(55): Identifier not declared 'event_press'.
GPC error: bob&kaz.gpc(55): Illegal operation 'arg:1'.
GPC error: bob&kaz.gpc(55): Illegal function call, near ')'
- Code: Select all
int Back, Forward;
int STICK_LEFT = FALSE;
int STICK_RIGHT = FALSE;
init {
Forward = BUTTON_13;
Back = BUTTON_12;
}
main {
if(event_press(BUTTON_13)) {
Back = BUTTON_12; Forward = BUTTON_13;
} else if(event_press(BUTTON_12)) {
Back = BUTTON_12; Forward = BUTTON_12;
}
if(get_val(PS4_RX) <= -95) {
STICK_LEFT = !FALSE;
} else STICK_LEFT = FALSE;
if(get_val(PS4_RX) >= 95) {
STICK_RIGHT = !FALSE;
} else STICK_RIGHT = FALSE;
if(STICK_LEFT) {
if(Forward == BUTTON_13) {
combo_run(KBD_BACK);
}else if(Forward == BUTTON_12) {
combo_run(KBD_FORWARD);
}
}
if(STICK_RIGHT) {
if(Forward == BUTTON_13) {
combo_run(KBD_FORWARD);
}else if(Forward == BUTTON_12) {
combo_run(KBD_BACK);
}
}
if(event_press(BUTTON_8)) {
combo_run(Tap_1);
combo_run(Tap_2);
combo_run(Tap_3);
combo_run(Tap_4);
}
if(event_press(BUTTON_8)) {
combo_run(Tap_5);
}
if(event_press(BUTTON_5)) {
combo_run(Tap_6);
combo_run(Tap_7);
combo_run(Tap_8);
combo_run(Tap_9);
}
if(event_press(BUTTON_5)) {
combo_run(Tap_10);
}
if(event_press(BUTTON_6)) {
combo_run(Tap_11);
combo_run(Tap_12);
combo_run(Tap_13);
combo_run(Tap_14);
}
}
combo KBD_FORWARD {
set_val(Forward, 100);
wait(20);
set_val(Forward, 0);
wait(20);
set_val(Forward, 100);
wait(20);
set_val(Forward, 0);
wait(125); // edit this wait time to fine tune your dash
set_val(Forward, 100);
set_val(BUTTON_11, 100);
wait(20);
set_val(Forward, 0);
set_val(BUTTON_11, 0);
wait(20);
}
combo KBD_BACK {
set_val(Back, 100);
wait(20);
set_val(Back, 0);
wait(20);
set_val(Back, 100);
wait(20);
set_val(Back, 0);
wait(125); // edit this wait time to fine tune your dash
set_val(Back, 100);
set_val(BUTTON_11, 100);
wait(20);
set_val(Back, 0);
set_val(BUTTON_11, 0);
wait(20);
}
combo Tap_1 {
set_val(BUTTON_11, 0);
wait(70);
set_val(BUTTON_11, 100);
wait(40);
set_val(BUTTON_11, 100);
}
combo Tap_2 {
set_val(BUTTON_11, 0);
wait(80);
set_val(BUTTON_11, 100);
wait(40);
set_val(BUTTON_11, 100);
}
combo Tap_3 {
set_val(BUTTON_12, 0);
wait(80);
set_val(BUTTON_12, 100);
wait(40);
set_val(BUTTON_12, 100);
}
combo Tap_4 {
set_val(BUTTON_12, 0);
wait(100);
set_val(BUTTON_12, 100);
wait(40);
set_val(BUTTON_12, 100);
}
combo Tap_5 {
set_val(BUTTON_12, 0);
wait(10);
set_val(BUTTON_12, 100);
wait(40);
set_val(BUTTON_12, 100);
}
combo Tap_6 {
set_val(BUTTON_11, 0);
wait(70);
set_val(BUTTON_11, 100);
wait(40);
set_val(BUTTON_11, 100);
}
combo Tap_7 {
set_val(BUTTON_11, 0);
wait(80);
set_val(BUTTON_11, 100);
wait(40);
set_val(BUTTON_11, 100);
}
combo Tap_8 {
set_val(BUTTON_13, 0);
wait(80);
set_val(BUTTON_13, 100);
wait(40);
set_val(BUTTON_13, 100);
}
combo Tap_9 {
set_val(BUTTON_13, 0);
wait(100);
set_val(BUTTON_13, 100);
wait(40);
set_val(BUTTON_13, 100);
}
combo Tap_10 {
set_val(BUTTON_13, 0);
wait(10);
set_val(BUTTON_13, 100);
wait(40);
set_val(BUTTON_13, 100);
}
combo Tap_11 {
set_val(BUTTON_11, 0);
wait(20);
set_val(BUTTON_11, 100);
wait(40);
set_val(BUTTON_11, 100);
}
combo Tap_12 {
set_val(BUTTON_13, 0);
wait(30);
set_val(BUTTON_13, 100);
wait(40);
set_val(BUTTON_13, 100);
}
combo Tap_13 {
set_val(BUTTON_13, 0);
wait(40);
set_val(BUTTON_13, 100);
wait(40);
set_val(BUTTON_13, 100);
}
combo Tap_14 {
set_val(BUTTON_14, 0);
wait(40);
set_val(BUTTON_14, 100);
wait(40);
set_val(BUTTON_14, 100);
}
combo Tap_15 {
set_val(BUTTON_11, 0);
wait(20);
set_val(BUTTON_11, 100);
wait(40);
set_val(BUTTON_11, 100);
}
combo Tap_16 {
set_val(BUTTON_13, 0);
wait(30);
set_val(BUTTON_13, 100);
wait(40);
set_val(BUTTON_13, 100);
}
combo Tap_17 {
set_val(BUTTON_13, 0);
wait(40);
set_val(BUTTON_13, 100);
wait(40);
set_val(BUTTON_13, 100);
}
combo Tap_18 {
set_val(BUTTON_14, 0);
wait(40);
set_val(BUTTON_14, 100);
wait(40);
set_val(BUTTON_14, 100);
the Errors in the box are
GPC error: bob&kaz.gpc(12): Identifier not declared 'event_press'.
GPC error: bob&kaz.gpc(12): Illegal operation 'arg:1'.
GPC error: bob&kaz.gpc(12): Illegal function call, near ')'
GPC error: bob&kaz.gpc(14): Identifier not declared 'event_press'.
GPC error: bob&kaz.gpc(14): Illegal operation 'arg:1'.
GPC error: bob&kaz.gpc(14): Illegal function call, near ')'
GPC error: bob&kaz.gpc(17): Identifier not declared 'PS4_RX'.
GPC error: bob&kaz.gpc(17): Illegal operation 'get_val'.
GPC error: bob&kaz.gpc(17): Illegal operation '<='.
GPC error: bob&kaz.gpc(20): Identifier not declared 'PS4_RX'.
GPC error: bob&kaz.gpc(20): Illegal operation 'get_val'.
GPC error: bob&kaz.gpc(20): Illegal operation '>='.
GPC error: bob&kaz.gpc(37): Identifier not declared 'event_press'.
GPC error: bob&kaz.gpc(37): Illegal operation 'arg:1'.
GPC error: bob&kaz.gpc(37): Illegal function call, near ')'
GPC error: bob&kaz.gpc(43): Identifier not declared 'event_press'.
GPC error: bob&kaz.gpc(43): Illegal operation 'arg:1'.
GPC error: bob&kaz.gpc(43): Illegal function call, near ')'
GPC error: bob&kaz.gpc(46): Identifier not declared 'event_press'.
GPC error: bob&kaz.gpc(46): Illegal operation 'arg:1'.
GPC error: bob&kaz.gpc(46): Illegal function call, near ')'
GPC error: bob&kaz.gpc(52): Identifier not declared 'event_press'.
GPC error: bob&kaz.gpc(52): Illegal operation 'arg:1'.
GPC error: bob&kaz.gpc(52): Illegal function call, near ')'
GPC error: bob&kaz.gpc(55): Identifier not declared 'event_press'.
GPC error: bob&kaz.gpc(55): Illegal operation 'arg:1'.
GPC error: bob&kaz.gpc(55): Illegal function call, near ')'
-
Ryujin-Jakka - Master Sergeant
- Posts: 27
- Joined: Sat Sep 09, 2017 11:55 pm
Re: GPC Language Reference Need a bit of help
event_press is T1 , the T2 function is "event_active"
to use ps4 button names add the line" #include <ps4.gph>" near the top of your script.
Or press F1 in GTuner IV and see the GPC Input Reference to get the BUTTON_ or STICK_ identifier to use instead.
Do you know of the "#include <titanone.gph>" headerfile line to use for easier usage of T1 scripts on the T2 ?
Converting it to plain T2 gpc code is a good approach to lean the new commands/functions.
There is also a converter available by buffy to convert script to the T2:
viewtopic.php?f=26&t=12027
to use ps4 button names add the line" #include <ps4.gph>" near the top of your script.
Or press F1 in GTuner IV and see the GPC Input Reference to get the BUTTON_ or STICK_ identifier to use instead.
Do you know of the "#include <titanone.gph>" headerfile line to use for easier usage of T1 scripts on the T2 ?
Converting it to plain T2 gpc code is a good approach to lean the new commands/functions.
There is also a converter available by buffy to convert script to the T2:
viewtopic.php?f=26&t=12027
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: GPC Language Reference Need a bit of help
okay now i am left with these two errors
GPC error: bob&kaz.gpc(17): Illegal operation '<='.
GPC error: bob&kaz.gpc(20): Illegal operation '>='.
GPC error: bob&kaz.gpc(17): Illegal operation '<='.
GPC error: bob&kaz.gpc(20): Illegal operation '>='.
-
Ryujin-Jakka - Master Sergeant
- Posts: 27
- Joined: Sat Sep 09, 2017 11:55 pm
Re: GPC Language Reference Need a bit of help
get_val returns fix32 numbers. you have to add a .0 to your numbers in those lines to match the number format.
- Code: Select all
if(get_val(PS4_RX) <= -95.0) {
STICK_LEFT = !FALSE;
} else STICK_LEFT = FALSE;
if(get_val(PS4_RX) >= 95.0) {
STICK_RIGHT = !FALSE;
} else STICK_RIGHT = FALSE;
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 114 guests