Script help

GPC1 script programming for Titan One. Code examples, questions, requests.

Script help

Postby lllilgabe123 » Mon Sep 03, 2018 11:44 pm

Could someone fix these scrips? Could you also explain to me how you fixed it and why the error came up?
Attachments
Overwatch Genji, Soldier, Reaper Combos.gpc
(5.56 KiB) Downloaded 158 times
76Test.gpc
(2.63 KiB) Downloaded 155 times
User avatar
lllilgabe123
Sergeant Major
Sergeant Major
 
Posts: 68
Joined: Fri Jul 20, 2018 7:40 pm

Re: Script help

Postby Scachi » Tue Sep 04, 2018 1:57 am

For Titan One or Titan Two ?
You are in the Titan One section of the forum.

Looks like you need it for T2 as you have added a #include <titanone.gph> line

Files Attached.
76test: added some missing ;
Overwatch: edited line //***********\\ to /************/ and added some missing ;
Attachments
ll_Overwatch Genji, Soldier, Reaper Combos.gpc
(5.55 KiB) Downloaded 94 times
ll_76Test.gpc
(2.63 KiB) Downloaded 174 times
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Script help

Postby lllilgabe123 » Tue Sep 04, 2018 11:02 am

Thank you! How did you know to change the //************\\ to /************/? And how do you know when to add the ;?
User avatar
lllilgabe123
Sergeant Major
Sergeant Major
 
Posts: 68
Joined: Fri Jul 20, 2018 7:40 pm

Re: Script help

Postby Scachi » Tue Sep 04, 2018 12:08 pm

It is just stuff I am used to spot on T1 and CM script conversion

For the missing ; the Titan Two requires a ; at the end of almost all lines that doesn't end with a } or { with the exception of if () and switch parentheses and alike.
The T1 did allow a line ending without a ; and it even accepted a : so be careful when checking this.
On a compile error from T1 scripts conversion I always look at the line the error got reported and the previous one.
Double clicking on a error or warning line jumps to the error or near it, depends on the error.

If I can't spot error directly I look for unusual combinations of comment like character/lines as the //****\\ thing.
Valid C comments I know of are
Code: Select all
// for a single line or 
 
/* the
comment here
in between  */

 
/* or for single/multine comments. */
 

A mix up of both tends to end in a compile error.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 81 guests