Dedicated server autopilot (current version: 2.0.4)
Moderator: OpenTTD Developers
Unlikely. If autopilot recognises nothing at all, then it does nothing, but the game should cotinue to run. The game is quitting, without autopilot telling it to. I won't know why until tonight, when I get in.
Of course, if it really is broken, then I might have to expedite the release of autopilot 2...
Of course, if it really is broken, then I might have to expedite the release of autopilot 2...
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
-
- Engineer
- Posts: 20
- Joined: 31 Aug 2006 15:28
Yes, but autopilot (Expect) starts openttd and sice MiniIN -r6027 crash openttd probably after start over autopilot. Without autopilot works this version of openttd perfectlyBrianetta wrote:Unlikely. If autopilot recognises nothing at all, then it does nothing, but the game should cotinue to run.

I think, autopilot or Exept is not the problem. Why crasht openttd suddenly after start over autopilot......
cu
Picknicker
Last edited by Picknicker on 11 Sep 2006 18:10, edited 1 time in total.
OK - just to be absolutely clear:
DO NOT USE r6027. Any games saved with r6027 WILL NOT WORK.
Please download the latest SVN and compile it. It has the most sync with trunk, and bug fixes.
Are you trying to start your server with a particular game? Have you tried creating a new .cfg file? (since at r6027 old TGP was removed and at r6028 new TGP was synced from trunk - both of these changed the settings saved in the .cfg file)
My bet is you have an old .cfg that is no longer compatible, and that MiniIN is dying in dedicated mode because it is trying to access info that is not in the .cfg.
DO NOT USE r6027. Any games saved with r6027 WILL NOT WORK.
Please download the latest SVN and compile it. It has the most sync with trunk, and bug fixes.
Are you trying to start your server with a particular game? Have you tried creating a new .cfg file? (since at r6027 old TGP was removed and at r6028 new TGP was synced from trunk - both of these changed the settings saved in the .cfg file)
My bet is you have an old .cfg that is no longer compatible, and that MiniIN is dying in dedicated mode because it is trying to access info that is not in the .cfg.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
-
- Engineer
- Posts: 20
- Joined: 31 Aug 2006 15:28
Yes i know, current i use MiniIN-r6362.richk67 wrote:OK - just to be absolutely clear:
DO NOT USE r6027. Any games saved with r6027 WILL NOT WORK.
Please download the latest SVN and compile it. It has the most sync with trunk, and bug fixes.
without autopilot MiniIN-r6362 works great.
Only a start with autopilot work not.
version <= r5838 works with autopilot,
version >= r6027 works not with autopilot.
I start server with a new game - no savegame. The cfg was firstly from old version, now i have deleted old cfg file. But it does not work yet with autopilott & new cfg file.richk67 wrote: Are you trying to start your server with a particular game? Have you tried creating a new .cfg file? (since at r6027 old TGP was removed and at r6028 new TGP was synced from trunk - both of these changed the settings saved in the .cfg file)
My bet is you have an old .cfg that is no longer compatible, and that MiniIN is dying in dedicated mode because it is trying to access info that is not in the .cfg.
Greetings. Im new om theese forums, and i saw this little script of yours, COOL!
I've tried to get it running without luck so far. Im using Expect 5.21 for Windows and this is what happens;
E:\TTD>expect autopilot.txt
bad option "equal": must be compare, first, index, last, length, match, range, t
olower, toupper, trim, trimleft, trimright, wordend, or wordstart
while executing
"string equal "$arg1" "load" "
(file "autopilot.txt" line 52)
What does this mean?
Any help would be appriciated!
I've tried to get it running without luck so far. Im using Expect 5.21 for Windows and this is what happens;
E:\TTD>expect autopilot.txt
bad option "equal": must be compare, first, index, last, length, match, range, t
olower, toupper, trim, trimleft, trimright, wordend, or wordstart
while executing
"string equal "$arg1" "load" "
(file "autopilot.txt" line 52)
What does this mean?
Any help would be appriciated!
Oldskool TTD Guru 

Ok those lines were obviously for the loadgame option, removed them and this comes up;
E:\TTD>expect autopilot2.txt
Starting new game
exp_spawn ./openttd -c openttd.cfg -D
*** AUTOPILOT ENGAGED ***
syntax error in expression "true"
while executing
"while true {
if $recount_trigger {
set auto_flag 1
exp_send "echo recount clients\n"
set recount_trigger false
}
expect {
..."
(file "autopilot2.txt" line 74)
E:\TTD>expect autopilot2.txt
Starting new game
exp_spawn ./openttd -c openttd.cfg -D
*** AUTOPILOT ENGAGED ***
syntax error in expression "true"
while executing
"while true {
if $recount_trigger {
set auto_flag 1
exp_send "echo recount clients\n"
set recount_trigger false
}
expect {
..."
(file "autopilot2.txt" line 74)
Oldskool TTD Guru 

As glx says. You can try rewriting or rebuilding openttd such that it's a console application (which it is on every other supported platform) or running it on any other platform.
The next version will actually give a proper error message about this if run in Windows.
The next version will actually give a proper error message about this if run in Windows.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
With the prebuilt binaries, yes.
With a VC debug binary, or a release binary built from properly modified source, it shouldn't be a problem.
With a VC debug binary, or a release binary built from properly modified source, it shouldn't be a problem.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Probably not, unless you're competent in C. The trouble stems from the console code. There's some precompiler code that checks to see whether the target platform is win32, and if it is, it compiles in some code that creates a new window for the dedicated console. This window cannot be read by Expect, and this is the root of the problem.
I've talked to a couple of the devs about this, and they say it's something to do with the way the Visual C makes a project - overarching and wide definitions of a project, such as "console application" and "GUI application." It seems that a program which is both is not made easy. GUI applications aren't given standard input and output, which is why this extra window is opened up.
Whether removing this precompiler code and compiling it under some different environment (perhaps gcc under Cygwin?) will get rid of the problem, I have no idea. I'm not a C programmer (well, not since about 1995) and I have never used a Windows based C environment. Perhaps if somebody here with the relevant experience wants to look at it, there could be an autopilot for Windows servers. Until then, I'm afraid there's very little chance of being able to put something together.
I've talked to a couple of the devs about this, and they say it's something to do with the way the Visual C makes a project - overarching and wide definitions of a project, such as "console application" and "GUI application." It seems that a program which is both is not made easy. GUI applications aren't given standard input and output, which is why this extra window is opened up.
Whether removing this precompiler code and compiling it under some different environment (perhaps gcc under Cygwin?) will get rid of the problem, I have no idea. I'm not a C programmer (well, not since about 1995) and I have never used a Windows based C environment. Perhaps if somebody here with the relevant experience wants to look at it, there could be an autopilot for Windows servers. Until then, I'm afraid there's very little chance of being able to put something together.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
I made a patch to convert windows version of OpenTTD into a console app and I think it should work with autopilot.
There is one UNSOLVABLE problem with it: a console popup and close before the game window if run from explorer (with double-click).
It's a bit annoying, but there's no other way if you want a "real" console.
EDIT: I tried with autopilot and it works (needed to do small changes
)
To run it, install ActiveTcl and run "tclsh autopilot.txt" from a command shell (in openttd dir of course
)
There is one UNSOLVABLE problem with it: a console popup and close before the game window if run from explorer (with double-click).
It's a bit annoying, but there's no other way if you want a "real" console.
EDIT: I tried with autopilot and it works (needed to do small changes

To run it, install ActiveTcl and run "tclsh autopilot.txt" from a command shell (in openttd dir of course

- Attachments
-
- win32console_3.diff
- makes openttd a console app
- (4.78 KiB) Downloaded 389 times
-
- autopilot.txt
- autopilot 1.3 for windows
- (6.39 KiB) Downloaded 394 times
Last edited by glx on 08 Sep 2006 00:40, edited 1 time in total.
I see you changed the \n to \r after each command that the autopilot sends. Was that necessary? If so, I shall modify the new version appropriately. I'd have thought that the actual correct behaviour in Windows would be to send both.glx wrote:I've added a modified autopilot.txt in my previous post.
Any reason why you changed the expect_out array index from 0 to 1 and added parentheses?
That's handled rather differently in 2.0 in any case.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
Who is online
Users browsing this forum: No registered users and 16 guests