|
Page 1 of 1
|
[ 9 posts ] |
|
| Author |
Message |
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
 Strange debug fix
I ran into an issue I really haven't seen before and one that could cause someone a lot of head scratching in the debug process.
The proGameInfo script missed the right values in the "Tin Man" ship in Big D's Wizard of Oz edit. One ship in the middle of the ship catalogue - those before it were right and those after it right. I went through the code and it looked like all was right so I decided to slow the script down with a delay trigger so I could maybe see what was going on. I didn't see anything wrong so I checked the output - problem fixed.
This issue is with using T-Edt accessing TWGS on 1.27.0.1 port 2002 and I think due to the speed information comes through sometimes. I don't know if it would exist if I was remoting in or not.
So anyway, if you run into a problem with a T-Edit script, try inserting a delay trigger to see what happens. I used a 250 ms delay since I figured that was long enough for me to see what the script was doing. Since I am not a programmer, just write barely good enough to get by, I may be completely out in left field on this one.
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
| Wed Oct 22, 2008 1:36 am |
|
 |
|
V'Ger
Gameop
Joined: Tue Sep 25, 2007 7:27 pm Posts: 530 Location: Long Island
|
 Re: Strange debug fix
I have noticed that a few times myself Prom. Dang ultra fast ping when doing it from a local machine 
_________________ If you have a building game, they will come...
Proud Sysop of ICE9 TWGS Home of Building and Non Regulated Games http://www.oregonsouth.com/ice9 telnet://ice9-tw.com:2002
|
| Wed Oct 22, 2008 6:38 am |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
 Re: Strange debug fix
If a script works sometimes but breaks when the data comes through too fast, it's because you didn't use a waitOn or waitFor trigger. IM me if you want help hunting it down.
+EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Wed Oct 22, 2008 6:42 am |
|
 |
|
V'Ger
Gameop
Joined: Tue Sep 25, 2007 7:27 pm Posts: 530 Location: Long Island
|
 Re: Strange debug fix
EP,
Thanks for the offer, but what I have found is that sometimes the data is streaming so fast, that it comes back to TWX before the script can execute the WaitFor command. I have had many instances of debuging a TEDIT script where it hangs, I look at the triggers and all that is listed is a WaitFor command, and the input it is waiting for is already displayed on the screen. I know that everything matches up because when I put a small delay trigger in front of the WaitFor the script works as intended. As Prom said though, I have only observed this behavior when running a TEDIT script on a local machine.
_________________ If you have a building game, they will come...
Proud Sysop of ICE9 TWGS Home of Building and Non Regulated Games http://www.oregonsouth.com/ice9 telnet://ice9-tw.com:2002
|
| Wed Oct 22, 2008 7:58 am |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
 Re: Strange debug fix
If either of you can email me a script and describe the parameters, I could be of more help. If we can shed some light on it, maybe we can hold another script class and show others how to avoid the problem.
I remember pulling my hair out once troubleshooting a text trigger that consistently wouldn't fire, and it ended up being an ANSI code (#7 Bell I think) embedded right in the middle of the text line. Craziness, but explainable.
+EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Wed Oct 22, 2008 6:35 pm |
|
 |
|
Singularity
Veteran Op
Joined: Thu Jun 02, 2005 2:00 am Posts: 5558 Location: USA
|
 Re: Strange debug fix
If you have the CN setting w/ the bell or beep or whatever it is set to on you'll get that in a lot of places. Dunno if 2.04 fixed that or not, but it used to drive me nuts when I was writing my first torper (fighits have a bell).
So yea, definitely check the raw packet.
_________________ May the unholy fires of corbomite ignite deep within the depths of your soul...
1. TWGS server @ twgs.navhaz.com 2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads 3. Open IRC chat @ irc.freenode.net:6667 #twchan 4. Parrothead wrote: Jesus wouldn't Subspace Crawl.
*** SG memorial donations via paypal to: dpocky68@booinc.com
|
| Wed Oct 22, 2008 6:45 pm |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
 Re: Strange debug fix
Exactly. That is why I wrote that ASCII code parser script on Grimy. Priceless for stuff like that.
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Wed Oct 22, 2008 7:07 pm |
|
 |
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
 Re: Strange debug fix
ElderProphet wrote: If either of you can email me a script and describe the parameters, I could be of more help. If we can shed some light on it, maybe we can hold another script class and show others how to avoid the problem.
I remember pulling my hair out once troubleshooting a text trigger that consistently wouldn't fire, and it ended up being an ANSI code (#7 Bell I think) embedded right in the middle of the text line. Craziness, but explainable.
+EP+ I will get with you on the script for the game info. I am using waitfors, and I thought that would take care of any issues, but I found I had to use the delay trigger also. The delay trigger is set after reading ship data and then sending ">" to go to the next ship. I don't know if the delay trigger allows the script to store data by slowing the execution. I have also found out that the same issue existed on the planets when I ran into deleted planets. The weird thing to me on the Wizard of Oz edit was that it got the ship name "Tin Man" correct, but the data was wrong. It came from the ship spec after that one - a non-active ship I believe that should not have even been read.
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
| Wed Oct 22, 2008 7:59 pm |
|
 |
|
Big D
Veteran Op
Joined: Tue Nov 28, 2006 4:04 pm Posts: 5025
|
 Re: Strange debug fix
Hey Prom. Glad to see I was able to help by causing you all this extra grief. 
|
| Thu Oct 23, 2008 1:07 pm |
|
 |
|
|
Page 1 of 1
|
[ 9 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 24 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
|
|