| www.ClassicTW.com http://classictw.com/ |
|
| Mombot script changes required http://classictw.com/viewtopic.php?f=15&t=34312 |
Page 1 of 1 |
| Author: | Tweety [ Sat Apr 19, 2014 12:51 pm ] |
| Post subject: | 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. |
|
| Author: | Tweety [ Sat Apr 19, 2014 1:14 pm ] |
| Post subject: | 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. |
|
| Author: | Assaulter [ Sat Apr 19, 2014 3:17 pm ] |
| Post subject: | Re: Mombot script changes required |
Thanks! |
|
| Author: | T0yman [ Sun Apr 20, 2014 9:46 am ] |
| Post subject: | Re: Mombot script changes required |
Why not take the simple approach and just ask EP to change the value back. |
|
| Author: | Tweety [ Sun Apr 20, 2014 2:01 pm ] |
| Post subject: | 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. |
|
| Author: | T0yman [ Sun Apr 20, 2014 2:38 pm ] |
| Post subject: | 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. |
|
| Author: | Tweety [ Sun Apr 20, 2014 3:41 pm ] |
| Post subject: | 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. |
|
| Author: | ElderProphet [ Sun Apr 20, 2014 8:31 pm ] |
| Post subject: | 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+ |
|
| Author: | Big D [ Sun Apr 20, 2014 10:26 pm ] |
| Post subject: | 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. |
|
| Author: | Mongoose [ Sun Apr 20, 2014 11:01 pm ] |
| Post subject: | Re: Mombot script changes required |
Oh look, it's Captain Pessimism. |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|