View unanswered posts | View active topics It is currently Fri Mar 29, 2024 5:10 am



Reply to topic  [ 10 posts ] 
 Mombot script changes required 
Author Message
Boo! inc.

Joined: Fri Jan 04, 2002 3:00 am
Posts: 221
Location: Canada
Unread post Mombot script changes required
Just a not for those who updated to the latest TWX Proxy 2.05.73

If you are using mombot, you will have to have your mombot script changed a bit. Anywhere the script uses SECTOR.ANOMOLY you will have to change it to SECTOR.ANOMALY

because in the change log, EP changed the spelling. I found two places in mombot code where it has the potential to crash. one is in the save mow section. the other is in the sector where you can use the menu system to grid. using >> because it tries to read the anomaly reading from the database.

I would give you line numbers; however, my line numbers are going to be off from yours since i have made some other modifications to allow .ts files to load instead of just .cts files among other changes.


first section:

Code:
setVar $limpetsSafe (SECTOR.ANOMOLY[$nextSafeSector] = FALSE) OR ((((SECTOR.LIMPETS.OWNER[$nextSafeSector] = "yours") OR (SECTOR.LIMPETS.OWNER[$nextSafeSector] = "belong to your Corp"))))

change to:

setVar $limpetsSafe (SECTOR.ANOMALY[$nextSafeSector] = FALSE) OR ((((SECTOR.LIMPETS.OWNER[$nextSafeSector] = "yours") OR (SECTOR.LIMPETS.OWNER[$nextSafeSector] = "belong to your Corp"))))


and then a place where it will crash because SECTOR.ANOMOLY will return "" which is not a number. where as SECTOR.ANOMALY will return a number because it is initialized to 0 to start.

so change:
Code:
if (SECTOR.ANOMOLY[$ADJ_SEC])


to:
Code:
if (SECTOR.ANOMALY[$ADJ_SEC])


I could not find any other references to ANOMOLY in the code, but there may have been more instances in code that I took out of mombot. but i'm pretty sure that is it.


Sat Apr 19, 2014 12:51 pm
Profile
Boo! inc.

Joined: Fri Jan 04, 2002 3:00 am
Posts: 221
Location: Canada
Unread post Re: Mombot script changes required
and i guess if you really wanted to support older twx versions and new. you could do a check to see if SECTOR.ANOMOLY is "" if so, do a check on SECTOR.ANOMALY since it should be a numerical value. i didn't see a place where you could check the TWX version. i saw you could check script version, but that is just for compiled scripts.


Sat Apr 19, 2014 1:14 pm
Profile
Warrant Officer
User avatar

Joined: Thu May 09, 2013 2:21 pm
Posts: 73
Unread post Re: Mombot script changes required
Thanks!

_________________
-Zoom

Zoom's Team Speak3 Server @ ts3server://vs26.tserverhq.com:7214
TradeWars2002: The Basics @ http://playtwars.altervista.org


Sat Apr 19, 2014 3:17 pm
Profile
Veteran Op
User avatar

Joined: Sat Dec 29, 2007 5:06 pm
Posts: 2059
Location: Oklahoma
Unread post Re: Mombot script changes required
Why not take the simple approach and just ask EP to change the value back.

_________________
T0yman (Permanently Retired since 2012)
Proverbs 17:28 <-- Don't know it, most should it would stop a lot of the discussions on here.


Sun Apr 20, 2014 9:46 am
Profile ICQ YIM WWW
Boo! inc.

Joined: Fri Jan 04, 2002 3:00 am
Posts: 221
Location: Canada
Unread post Re: Mombot script changes required
it was pretty simple to change two sections. otherwise people would have to wait until a new release came out of twx.


Sun Apr 20, 2014 2:01 pm
Profile
Veteran Op
User avatar

Joined: Sat Dec 29, 2007 5:06 pm
Posts: 2059
Location: Oklahoma
Unread post Re: Mombot script changes required
That's for mombot, what about all the other scripts out there that use that variable and are compiled that won't be able to be fixed that you haven't found yet. Either way is fine with me since I don't currently play but just trying to help others.

_________________
T0yman (Permanently Retired since 2012)
Proverbs 17:28 <-- Don't know it, most should it would stop a lot of the discussions on here.


Sun Apr 20, 2014 2:38 pm
Profile ICQ YIM WWW
Boo! inc.

Joined: Fri Jan 04, 2002 3:00 am
Posts: 221
Location: Canada
Unread post Re: Mombot script changes required
i'm sure EP knows about it. he put this into his change log

* CORE: The spelling of Anomaly has been changed (from Anomoly). This affects
associated system values and constants.


Sun Apr 20, 2014 3:41 pm
Profile
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1131
Location: Augusta, GA
Unread post Re: Mombot script changes required
I'm aware of the issue, but it's been changed for a long time, through several iterations of TWX. Being a scripter, I've tried very hard to avoid these sorts of problems, but missed how much impact this change might make. Still, I feel the smoothest path forward is to NOT redact this change. I apologize if this causes you problems.

+EP+

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Sun Apr 20, 2014 8:31 pm
Profile WWW
Veteran Op

Joined: Tue Nov 28, 2006 4:04 pm
Posts: 5025
Unread post Re: Mombot script changes required
ElderProphet wrote:
I'm aware of the issue, but it's been changed for a long time, through several iterations of TWX. Being a scripter, I've tried very hard to avoid these sorts of problems, but missed how much impact this change might make. Still, I feel the smoothest path forward is to NOT redact this change. I apologize if this causes you problems.

+EP+


I wouldn't fret it there Elder. It's no different than us scripters had to do because of J.P.'s changes to TWGS. It's not like there's anyone left playing this game anyway. BTW, the way you scorned the player for asking questions about scripts in the "Tradewars Helpers & Scripts" forum was abolutely unique. One wonders why players won't stick around.


Sun Apr 20, 2014 10:26 pm
Profile
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post Re: Mombot script changes required
Oh look, it's Captain Pessimism.

_________________
Suddenly you're Busted!


Sun Apr 20, 2014 11:01 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.