| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| 2_build https://mail.black-squirrel.com/viewtopic.php?f=15&t=17080 |
Page 1 of 1 |
| Author: | Lostone [ Fri Mar 03, 2006 10:11 am ] |
| Post subject: | |
I am tyring to figure out some of the more complex versions of scripting so I decided to try and take a look at this and see what I could find from this program. I had originally intended to just go ahead and try and get a script that I could use to upgrade a single sector but I didn't know enough about the included files so I used this script as a model. While trying to figure it out I found a bug in this script that I am wondering if anyone else has encountered. IT seems that it will start fine and work on getting a sector but when it goes into the make planets subroutine it locks up if it doesn't build enough of the wanted planets before it runs out of credits to build. Once it gets below the credit limit it jsut locks itself into a loop and keeps going through a sector display loop. I tried to add some lines to the 2_build script to track down the loop but it appears that the loop isn't where I thought it was in the routine and it might be in the actual include file? anyone else work on this script at all or could point me in a direction I might be able to figure out? |
|
| Author: | Singularity [ Fri Mar 03, 2006 5:49 pm ] |
| Post subject: | |
Most of the routines are in the include files. You can download the source at: http://twxproxy.com/download.php At the very top before the download links there's a link to the source release. One of the best lessons in scripting there. |
|
| Author: | Lostone [ Sat Mar 04, 2006 8:05 am ] |
| Post subject: | |
yeah I have the source file I have been tearing apart the makeplanet subroutine to try and find where the loop is. That is my problem I vcan't find the problem with the loop in the actual script I think the probnlem with the loop might be with the actual include file. Can you change the include files anbd leave them uncomilied or do they have to be compiled to run? I added a line to print a client message in the actual build script after it is supposed to be kicked out of the makeplanet subroutine when it has failed( that is the first problem I found in the script the variable returned is called failed in makeplanet but in the build script it was called failure) But the client message never shows up so it apperas that the script never gets kicked out of the makeplanet script when you run out of money whiel trying to resupply. It works fine if you have a lot of money on you so that ti can just go to stardock but when the actual makeplanet include routine runs out of money it just loops intos a display sector and display info routine. So the best I can figure is that when it runs out of money it won't kick out of the makeplanet include file and jsut loops in the getting player info include. So the real question is how do you edit the include files so I can track down the endless loop and do you have to compile them to get them to run properly. |
|
| Author: | Vulcan [ Sat Mar 04, 2006 7:13 pm ] |
| Post subject: | |
It is things like this that encourage not running some scripts afk, and be at the keys to stop the script when it fails and find the script maker and let him know about the bug, although Exide isn't available for it any more, there are others out there who are taking up the Quest of TWX Proxy that may be able to help, you just have to get with them, they will try to help you, I am just learning the TWX Proxy scripting my self, and find myself asking questions to some of them a bit myself, so hit them up. |
|
| Author: | Lostone [ Sat Mar 04, 2006 11:25 pm ] |
| Post subject: | |
I thought that is what I was trying to do here? I am looking for people with more knowledge to help me out a bit. I am hoping to get a hit or two from this so that I can figure out waht I need to do |
|
| Author: | Singularity [ Sun Mar 05, 2006 1:28 am ] |
| Post subject: | |
Debugging TWX is pretty much like debugging everything else. Set what are known as "watch points" ... basically echo the value of variables at various stages in the script. As you see them appear you can then trace the flow of the program. It sounds like you've already found the problem. All you need to do is write a small handler to escape the script when the credit amount gets too low, or kick off to another include that gets cash from another cit and then checks for a re-cash failure. As for running scripts afk, it's generally not a good idea to sleep thru any kind of script. You'd be suprised what things can happen. |
|
| Author: | Wildstar [ Sun Mar 05, 2006 1:39 am ] |
| Post subject: | |
If you get a scripter like me who knows some things, we can exploit peoples scripts while afk. One that comes to mind is screwing with people who run save me. There is a bug that you can use even over fed. So be careful. |
|
| Author: | Singularity [ Sun Mar 05, 2006 3:30 am ] |
| Post subject: | |
Laff... one reason why scripts are meant to remain private. =) There's a bug in ck saveme? Can you callsaveme on fed? I have a hard time believing that since it does check the corpie list when it loads. Is that the bug? |
|
| Author: | ElderProphet [ Tue Mar 07, 2006 12:36 am ] |
| Post subject: | |
To answer your question about includes Lostone, no, they do not have to be compiled or encrypted, though they can be. Send me a private message with detailed script excerpts, and I'll fix it in the upcoming release. +EP+ |
|
| Author: | Lostone [ Wed Mar 08, 2006 6:35 pm ] |
| Post subject: | |
Thank you prophet that is the answer to the question I needed if include files needed to be compiled or not [:D] Now that I know that I can try and really find the bug in the script on a test server. As to solving the problem in later releases why would I want to do that hehe that would make it just as easy for other people to do this as it would for me. As to the other suggestion about scripting afk. I am normally at keys while I am running a script. I have also found out the hard way about leaving scripts running while not around. it isn't pleasant. lol |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|