| www.ClassicTW.com https://mail.black-squirrel.com/ |
|
| TWX Script Hangs https://mail.black-squirrel.com/viewtopic.php?f=15&t=21623 |
Page 1 of 1 |
| Author: | Thrawn [ Mon Mar 02, 2009 10:47 pm ] |
| Post subject: | TWX Script Hangs |
I run a script for our TradeWars Academy game where a fedsweeper script runs. The OCSBot is logged in via admin, switches to TW mode, logs into the game, runs the OCSBot script. Then it logs out, goes to tedit mode, and runs a fedsweeper function. Once done, it returns to TW mode and re-enters the game, etc. My issue is once in a while the script when going to tedit mode hangs at the Password? prompt. I have the script set to enter the tedit password, but every once in a while that is EXACTLY where it hangs. I'm trying to understand why that is. I can restart the script and then it is fine. I run the TWGS on one machine, and the OCSBot is on a different machine. I was thinking it's a network issue with a dropped packet, but was curious if any of the TWX/script gurus might know why. |
|
| Author: | Promethius [ Tue Mar 03, 2009 1:02 am ] |
| Post subject: | Re: TWX Script Hangs |
Thrawn wrote: I run a script for our TradeWars Academy game where a fedsweeper script runs. The OCSBot is logged in via admin, switches to TW mode, logs into the game, runs the OCSBot script. Then it logs out, goes to tedit mode, and runs a fedsweeper function. Once done, it returns to TW mode and re-enters the game, etc. My issue is once in a while the script when going to tedit mode hangs at the Password? prompt. I have the script set to enter the tedit password, but every once in a while that is EXACTLY where it hangs. I'm trying to understand why that is. I can restart the script and then it is fine. I run the TWGS on one machine, and the OCSBot is on a different machine. I was thinking it's a network issue with a dropped packet, but was curious if any of the TWX/script gurus might know why. I have ran into strange issues with T-Edit scripting that "shouldn't" happen. I would check the triggers that are active at that point to start with. It may be looking for something that isn't there. I've had to use waitfor a lot in T-Edit where I don't have to use it in normal game scripting - "shouldn't" be a difference I would think. |
|
| Author: | Vid Kid [ Tue Mar 03, 2009 3:51 am ] |
| Post subject: | Re: TWX Script Hangs |
That is probably the exact problem .. Use waitfor That is the only way I've gotten the password issue resolved. refer to my 14_login.ts script for sysops I go to and from admin to in game and back many times without issues anymore. |
|
| Author: | V'Ger [ Tue Mar 03, 2009 9:40 am ] |
| Post subject: | Re: TWX Script Hangs |
I also have encountered this issue sometimes with Sysbot. I have a workaround in mind, just not gotten a chance to code it yet... put a delaytrigger in when the script starts an iteration, make it maybe twice as long as the script normally takes to run, and have it reset at each iteration. If the trigger hits, the script is hung, so I drop the connection and restart the script. This happens even when the TWX is running on the same box as the TWGS. |
|
| Author: | Thrawn [ Tue Mar 03, 2009 11:19 pm ] |
| Post subject: | Re: TWX Script Hangs |
Promethius wrote: I have ran into strange issues with T-Edit scripting that "shouldn't" happen. I would check the triggers that are active at that point to start with. It may be looking for something that isn't there. I've had to use waitfor a lot in T-Edit where I don't have to use it in normal game scripting - "shouldn't" be a difference I would think. Agreed. Checked and managed to locate the trigger that it was "waiting" on. Managed to fix that. Also noticed that I had two triggers waiting on the exact same thing and managed to fix that. Vid Kid wrote: That is probably the exact problem .. Use waitfor That is the only way I've gotten the password issue resolved. refer to my 14_login.ts script for sysops I go to and from admin to in game and back many times without issues anymore. I took a look at your 14_login.ts script and liked what you did for the admin login. I used the same method as you had and so far no issues now. If you do not mind, I'd like to incorporate that permanately into my ScoreKeeper script to avoid any further issues. V'Ger wrote: I also have encountered this issue sometimes with Sysbot. I have a workaround in mind, just not gotten a chance to code it yet... put a delaytrigger in when the script starts an iteration, make it maybe twice as long as the script normally takes to run, and have it reset at each iteration. If the trigger hits, the script is hung, so I drop the connection and restart the script. This happens even when the TWX is running on the same box as the TWGS. We had a similar instance too with that, but it has been fine on my end now. I believe you gave Daala a hand with the issue. Appreciate the help guys. |
|
| Author: | Big D [ Wed Mar 04, 2009 7:17 am ] |
| Post subject: | Re: TWX Script Hangs |
It's probably because it misses something occasionally. A few waitFor commands could slow it down enought to cure this problem since it's not speed you are looking for here. |
|
| Author: | V'Ger [ Wed Mar 04, 2009 11:19 am ] |
| Post subject: | Re: TWX Script Hangs |
Thrawn wrote: V'Ger wrote: I also have encountered this issue sometimes with Sysbot. I have a workaround in mind, just not gotten a chance to code it yet... put a delaytrigger in when the script starts an iteration, make it maybe twice as long as the script normally takes to run, and have it reset at each iteration. If the trigger hits, the script is hung, so I drop the connection and restart the script. This happens even when the TWX is running on the same box as the TWGS. We had a similar instance too with that, but it has been fine on my end now. I believe you gave Daala a hand with the issue. Appreciate the help guys. I tightened it up, and that helped, but maybe once every 7-10 days it will still hang at the password prompt... just have been too lazy to fix it, maybe when I add the other sysbot features that I want to add. |
|
| Author: | the reverend [ Wed Mar 04, 2009 8:41 pm ] |
| Post subject: | Re: TWX Script Hangs |
i've had this problem too and i think i know why it happens. the problem is that behind the scenes twgs.exe is actually handing off responsibility for the user input to tw2002.exe (or tedit.exe?) and if you time it just right when you send your password, it falls between the cracks and neither process catches it. using the waitfor ensures that you're fully in tw2002.exe before you send the password. |
|
| Author: | Thrawn [ Wed Mar 04, 2009 10:14 pm ] |
| Post subject: | Re: TWX Script Hangs |
the reverend wrote: i've had this problem too and i think i know why it happens. the problem is that behind the scenes twgs.exe is actually handing off responsibility for the user input to tw2002.exe (or tedit.exe?) and if you time it just right when you send your password, it falls between the cracks and neither process catches it. using the waitfor ensures that you're fully in tw2002.exe before you send the password. Thanks Rev. I was going to ask that very thing, so I made sure that I have the WaitFor in place to avoid the problem. So far so good, no hanging in the last 8 hours solid. |
|
| Page 1 of 1 | All times are UTC - 5 hours |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|