The New World Posted February 26, 2011 Author Share Posted February 26, 2011 All this is, is a command within your code that will execute a batch file that will restart your server, anytime it unexpectedly crashes. :)First off, let's build the batch file! Open NotePad, or any other text editor that allows you to save in the .bat format. Next, type in the code:```title "Fail-Safe Server Restarter":beginServer.exeServer.exegoto begin```The line:```title "Fail-Safe Server Restarter"```Is completely optional.All this script does is run your server if it's not already running, or if it stops running for any reason. To make this stop, just close the command line prompt that comes with it whilst running the script.Now save your file with the _save as_ dialog. Save the file as "anythingyouwanttonameit".bat, obviously without the " " 's. (Quotes >_>)Now, open up the the _Server source_!Now you have an option, either make a button, or use my tutorial on server text commands and make a case to run the fail-safe script.Whatever you choose, include the code:```Call Shell(App.Path & "\failsafe.bat")Unload me```Or simply, shut down your server and run the batch file itself. :) Link to comment Share on other sites More sharing options...
Guest Posted February 26, 2011 Share Posted February 26, 2011 This is awesome, Im adding this to the LoA engine. Thanks!! Link to comment Share on other sites More sharing options...
Repercussionist Posted February 26, 2011 Share Posted February 26, 2011 Wouldn't this pose a problem if the crash was caused by a critical bug that needs to be fixed before a restart? I wouldn't want to corrupt data, or have the sever in an infinite loop of crash/restart while I was away from my system. Link to comment Share on other sites More sharing options...
The New World Posted February 26, 2011 Author Share Posted February 26, 2011 Yeah, but, that's your fault if there's a critical bug in your software. :) I trust at least someone understands when to use and not to use this. It's meant for random crashes or the such whilst the server's controlling user is away. As the title says, a Fail-Safe. If it goes into that infinite loop, well you shouldn't be using this with such unstable software. Link to comment Share on other sites More sharing options...
noobi Posted March 7, 2011 Share Posted March 7, 2011 What if you get a error, you need first to click on "Ok" before it restart. Link to comment Share on other sites More sharing options...
The New World Posted March 7, 2011 Author Share Posted March 7, 2011 Read the post above yours. >_> Link to comment Share on other sites More sharing options...
noobi Posted March 7, 2011 Share Posted March 7, 2011 Sorry XD Link to comment Share on other sites More sharing options...
shadowwulf Posted March 7, 2011 Share Posted March 7, 2011 This is more for when your significant other decides to check facebook and closes "that annoying window." Link to comment Share on other sites More sharing options...
The New World Posted March 8, 2011 Author Share Posted March 8, 2011 Sounds very significant indeed. :P Link to comment Share on other sites More sharing options...
Craselin Posted March 10, 2011 Share Posted March 10, 2011 Love it, going to set it up. Could someone also please direct me to the server command topicAlso heres a more clean thing for the batch (havn't tested)```color 0a@echo offtitle "Fail-Safe Server Restarter":beginServer.exeServer.exegoto begin``` Link to comment Share on other sites More sharing options...
The New World Posted March 10, 2011 Author Share Posted March 10, 2011 @Craselin:> Love it, going to set it up. Could someone also please direct me to the server command topic> > Also heres a more clean thing for the batch (havn't tested)> ```> color 0a> @echo off> title "Fail-Safe Server Restarter"> :begin> Server.exe> Server.exe> goto begin> ```It's just a small batch command, whatever works. :)[EO Server Text Commands](http://www.touchofdeathforums.com/smf/index.php/topic,69402.0.html)Next time check the source index. Link to comment Share on other sites More sharing options...
Craselin Posted March 10, 2011 Share Posted March 10, 2011 @Yukiyo:> It's just a small batch command, whatever works. :)> > [EO Server Text Commands](http://www.touchofdeathforums.com/smf/index.php/topic,69402.0.html)> > Next time check the source index.Yep will do. Also my edit stops it from saying C://windows blah blah blah. and also makes the text green MUHAHAHA Link to comment Share on other sites More sharing options...
Craselin Posted March 12, 2011 Share Posted March 12, 2011 Sorry for the double post but i just wanted to show you a revised version of the batch file```@echo offcolor 0atitle "Fail-Safe Server Restarter"echo Welcome to the Fail safe server restarter...echo Opening server...echo Server was Opened at...time /techo.Server.exegoto loop:loopecho The server has crashed...echo Reopening server...echo Server was Reopened at...time /techo.Server.exegoto loop```The difference between this code and the first one is that this one tells you the time the server was reopened, it gets rid of the C:\Users\User\Documents\eo_2_0_0\server thingy, has a welcome message and has green text! Link to comment Share on other sites More sharing options...
The New World Posted March 13, 2011 Author Share Posted March 13, 2011 To quickly break this down.```@echo offcolor 0atitle "Fail-Safe Server Restarter"echo Welcome to the Fail safe server restarter...echo Opening server...echo Server was Opened at...time /techo.Server.exegoto loop:loopecho The server has crashed...echo Reopening server...echo Server was Reopened at...time /techo.Server.exegoto loop``````@echo off```This makes it to where it does no print a line of text saying the location of the file.```color 0a```This makes the foreground color green.```title "Fail-Safe Server Restarter"```This renames the console window.```echo Welcome to the Fail safe server restarter...echo Opening server...echo Server was Opened at...```These print text to the screen.```:loop```This is a starting point for all the code underneath.```goto loop```This goes back to the loop starting point. Link to comment Share on other sites More sharing options...
Craselin Posted March 15, 2011 Share Posted March 15, 2011 Exactlly, also..```time /t```tells the time Link to comment Share on other sites More sharing options...
Kocho Posted September 18, 2011 Share Posted September 18, 2011 Does it work if I have a runtime error 9 and the server has a crash?until we find a solution, I always get this error and my game is online Link to comment Share on other sites More sharing options...
DMF Posted September 19, 2011 Share Posted September 19, 2011 sad dis is useless XD… and i got a server restarter program and ill share it i guess Link to comment Share on other sites More sharing options...
Carim123 Posted September 19, 2011 Share Posted September 19, 2011 @Zarkaus:> sad dis is useless XD… and i got a server restarter program and ill share it i guessJust because it's useless for you doesn't make it generally useless. >_>@Kocho:> Does it work if I have a runtime error 9 and the server has a crash?> > until we find a solution, I always get this error and my game is onlineBecause of the nature of messageboxes, no, unless if you add something that spams out enter, whilist no button on the server is focused…not sure if batch files can do that.Simply do what I do, add a form of server-side errorhandler that adds the error to a log, sends a messagebox to the player explaining the crash, and telling them that the server will auto-reboot, and then directly end the server, and then this will promptly reboot itself. Link to comment Share on other sites More sharing options...
Craselin Posted September 29, 2011 Share Posted September 29, 2011 @Kocho:> Does it work if I have a runtime error 9 and the server has a crash?> > until we find a solution, I always get this error and my game is onlineYou might be able to find a way to stop this error from appearing and instead just closes the server and saves the error data to a txt? If I find anything I'll tell you :) Link to comment Share on other sites More sharing options...
RyokuHasu Posted September 29, 2011 Share Posted September 29, 2011 well that was only 10 days late XD Link to comment Share on other sites More sharing options...
Craselin Posted September 29, 2011 Share Posted September 29, 2011 @Ryoku:> well that was only 1000 days late XD:O Exaggeration much!Jks, well, yeah, I should start reading post times more often, thanks for pointing that out xD Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now