[Current Forum ] [Archive 2003 - 2005]
[Register]  [Profile]  [Preferences]  [Search]
[Private messages]  [Memberslist]  [FAQ]  [Login]
Subsim Radio Room Forum Index » » Sub Command » » Errors in SCX Beta Doctrine Files
Author Errors in SCX Beta Doctrine Files
jsteed


Joined: Apr 08, 2002
Posts: 253
Posted: 2002-07-22 22:13   
I checked the SCX doctrine files with my program and found several mistakes.

1. BomberEvade.txt line 13 should be removed, the conditional statements are unbalanced
} ENDIF

2. Torp_Adcap.txt & Torp_AI_Adcap.txt line 147 need parentheses around 1st element of conditional. Luckily, == take precedence over AND so the instruction does work, but it is dangerous to do this.
IF Homing == 0 AND ( OwnAlt < 0 ) THEN {

There were several other doctrines which have no space after the comment delimiter ';'. As I mentioned before, this can cause inconsistent behavior when running the doctrine file.

All in all, the doctrines were well debugged. Now that I've loaded SCX, I look forward to playing it.

Cheers, jsteed


  View Profile of jsteed      Edit/Delete This Post   Reply with quote
Thomasew


Joined: Feb 28, 2002
Posts: 1898
From: Bluewater Bay, South Africa
Posted: 2002-07-23 01:08   
Hi Jsteed

1. Hmmm. I added one command to, what I thought was the default 'BomberEvade.txt'. On line 20 I added PassiveEnable. Don't know where that other ENDIF came from.

Unless I had made some prior change at some stage .... and just left the ENDIF in there.

It doesn't do any harm down there ... as the other IFs are complete ... and there is nothing thereafter.

I'll remove it anyway ... for Beta 1.1 ... thanks.

2. Parenthesis not required there, given as there are only '2' conditions to meet. You only need additional parenthesis around AND conditions, when there is 'more' than 2 conditions to satisfy. In fact, this is one of the original lines from the default Torp Doctrine.

Surprised your systax checker only picked up this one. It happens quite frequently throughout the Doctrines ... for instance IF Runout !=1 AND ( Run >= Runout ) THEN { which appears in one of the last lines in the default Torpedo.txt .... works just fine.

Re the ; ... I haven't noticed any adverse reactions ... with or without a space thereafter. However, to be on the safe side ... I'll put the spaces in.

Thanks for checking.

Cheers
Tom



_________________
He Who Will Not Risk Cannot Win



[ This Message was edited by: Thomasew on 2002-07-23 01:12 ]


  View Profile of Thomasew      Edit/Delete This Post   Reply with quote
jsteed


Joined: Apr 08, 2002
Posts: 253
Posted: 2002-07-23 09:59   
Hi Tom,
Your right, the parenthesis are not abosolutely needed because relational operators (==, >, >=, etc) always take precedence over logical ones (and, or, not). At least thats the case if this interpreter follows C standards. A problem would occur if AND was replaced with, say, >=. Thanks for pointing out the other conditional without parenthesis that was not flagged. I do something different for == vs all other inequalities when checking. There is obviously a bug in that piece of code. By the way if you are interested in getting copy of the program, it is free for the asking. You undoubtedly would have a far greater use for it than I do.

Cheers, jsteed


  View Profile of jsteed      Edit/Delete This Post   Reply with quote
Thomasew


Joined: Feb 28, 2002
Posts: 1898
From: Bluewater Bay, South Africa
Posted: 2002-07-23 10:07   
Hi JSteed

Yes ... that would be great. I don't know how many times, my system has either frozen up, or gone all sluggish on me ... just because of some supercilious typo.

How can I get it from you?

Thanks

Cheers
Tom
_________________
He Who Will Not Risk Cannot Win


  View Profile of Thomasew      Edit/Delete This Post   Reply with quote
jsteed


Joined: Apr 08, 2002
Posts: 253
Posted: 2002-07-23 10:21   
Hi Tom,
Yep, your fustrations are those that forced me to write it. Send your email address to me and it will be on it's way. You can either send it to me via private message or at jst**db*ntl*y@hotmail.com. Replace the * with e. I'll have to fix the bug you pointed out and write a small description of what it will and will not do, so I won't be able to send it till later in the day.

Cheers, jsteed


  View Profile of jsteed      Edit/Delete This Post   Reply with quote
Lock this Topic Move this Topic Delete this Topic
Powered by phpBB Version 1.4.4
Copyright © 2000 - 2001 The phpBB Group

phpBB Created this page in 0.010801 seconds.