T1 code conversion

GPC2 script programming for Titan Two. Code examples, questions, requests.

T1 code conversion

Postby yohimbe » Sun Oct 16, 2016 4:09 pm

how do i get

Code: Select all
   if(SEMI == TRUE && SMG == FALSE && AR == FALSE && SENSE_MOUSE == TRUE && SENSE_MID == FALSE && SENSE_LOW == FALSE)

which turns out
Code: Select all
GPC error: NEWAUTOAIM.gpc(57): syntax error, unexpected ASSIGN '='.


right?

thanks
User avatar
yohimbe
Sergeant Major
Sergeant Major
 
Posts: 84
Joined: Sun Mar 01, 2015 7:27 pm

Re: T1 code conversion

Postby Scachi » Sun Oct 16, 2016 4:41 pm

Its hard to help you if you don't post the complete code.

Maybe you are trying to compare variables of different types without casting them correctly ?
Make sure you don't compare int with fix32 or something like that.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: T1 code conversion

Postby yohimbe » Sun Oct 16, 2016 7:23 pm

thats the header
Code: Select all
   #define TRUE         !FALSE              //                                                                                                                           
     #define SEMI         = TRUE//SEMI AUTOMATIC GUNS ex. SHEIVA                                                                             
     #define SMG          = FALSE//SUB MACHINE GUNS ex. VMP                                                                                   
     #define AR           = TRUE//AUSSAULT RIFLES ex. MAN O WAR                                                                               
#define MELEE           =XB1_RS;    //                                                                                                                       
    //                                                                                                                                         
    //               SENSITIVITY                                                                                                               
    //                                                                                                                                         
     #define SENSE_LOW    = FALSE//SENSITIVITY 1 - 4                                                                                           
     #define SENSE_MID    = TRUE//SENSITIVITY 5 - 14                                                                                         
     #define SENSE_MOUSE  = FALSE//SENSITIVITY 14 MOUSE                                                                                       
                                                                                                                                       
     #define RECOMMENDED  = TRUE; //Recommended Settings                                                                                         
     #define STRONGER     = FALSE; //Stronger than Recommended                                               
    #define INSANE       = FALSE;  //Strongest Assist possible   
User avatar
yohimbe
Sergeant Major
Sergeant Major
 
Posts: 84
Joined: Sun Mar 01, 2015 7:27 pm

Re: T1 code conversion

Postby Scachi » Sun Oct 16, 2016 8:26 pm

Your defines are in a wrong syntax, don't use = and ; there.

Code: Select all
#define SMG FALSE


Keep in mind that you should only use defines for stuff that isn't supposed to change during script execution.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: T1 code conversion

Postby pablosscripts » Mon Oct 17, 2016 3:12 am

Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Brigadier General
Brigadier General
 
Posts: 1976
Joined: Tue Nov 24, 2015 6:27 am

Re: T1 code conversion

Postby Fragsnipa » Mon Oct 17, 2016 9:38 pm

pablogroup wrote:Use this guide:

viewtopic.php?f=23&t=4609&hilit=mega


This guide need to sticked
Console= Xbone
Games = BF4, MCC, H5, BO3, Gears of War UE, Destiny, Gears of War 4, COD 4 Remaste, BF1.
User avatar
Fragsnipa
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 191
Joined: Sun Nov 16, 2014 6:27 am
Location: Queens, NY

Re: T1 code conversion

Postby UK_Wildcats » Tue Oct 18, 2016 12:17 am

Fragsnipa wrote:
pablogroup wrote:Use this guide:

viewtopic.php?f=23&t=4609&hilit=mega


This guide need to sticked


I just made it an announcement topic. If Jefferson doesn't approve, he can make it back to a regular topic
User avatar
UK_Wildcats
Brigadier General
Brigadier General
 
Posts: 2243
Joined: Thu Jan 08, 2015 6:53 pm

Re: T1 code conversion

Postby J2Kbr » Tue Oct 18, 2016 6:52 pm

Sure I approve!! :)
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: T1 code conversion

Postby pablosscripts » Wed Oct 19, 2016 12:42 am

Sweet! I'll let Wildcats do it, I have no idea how.
Setup: XIM Apex, T2, K780 keyboard, G Pro Wireless mouse, SteelSeries 4HD pad, DXRacer armrest, LucidSound LS30 headset, Netduma router, Ubiquiti UniFi AP LR

My R6 script: https://youtu.be/x-9NtxyySVM
User avatar
pablosscripts
Brigadier General
Brigadier General
 
Posts: 1976
Joined: Tue Nov 24, 2015 6:27 am

Re: T1 code conversion

Postby UK_Wildcats » Wed Oct 19, 2016 3:13 am

It was already done when I made my previous post
User avatar
UK_Wildcats
Brigadier General
Brigadier General
 
Posts: 2243
Joined: Thu Jan 08, 2015 6:53 pm

Next

Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 61 guests