Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Windows Restarter Script

 
Post new topic   Reply to topic Printable version
 View previous topic  <py> Blackjack Post :: Post <c> Poll  View next topic  
Author Message
Bak
?ls -s
0 in


Age:24
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Tue Mar 08, 2005 5:12 pm    Post subject: Windows Restarter Script Reply to topic Reply with quote

Been looking (not too hard) for a script for windows that would restart ASSS when it crashes similar to the Linux script that comes with ASSS. I figured it out and throught it would be useful information to share:

First off change your asss.bat slightly
Quote:

@echo off

ECHO starting asss...

GOTO START

:START

bin\asss.exe

IF ERRORLEVEL 5 GOTO MODLOAD
IF ERRORLEVEL 4 GOTO MODCONF
IF ERRORLEVEL 3 GOTO OOM
IF ERRORLEVEL 2 GOTO GENERAL
IF ERRORLEVEL 1 GOTO RECYCLE
IF ERRORLEVEL 0 GOTO SHUTDOWN

ECHO unknown exit code: %ERRORLEVEL%, restarting server(possible crash).

GOTO START


:SHUTDOWN
ECHO asss exited with shutdown.
GOTO END

:RECYCLE
ECHO asss exited with recycle.
GOTO START

:GENERAL
ECHO asss exited with general error.
GOTO END

:OOM
ECHO asss out of memory. restarting.
GOTO START

:MODCONF
ECHO asss cannot start. bad modules.conf.
GOTO END

:MODLOAD
ECHO asss cannot start. error loading modules.
GOTO END

:END


Then you have to disable the default windows error reporting system so it'll restart right away (instead of waiting you you to press send error report, debug, or cancel). All you have to do is get the process to execute the code, so you have lots of choices here. You could recompile your ASSS core and do it in main (probably the most correct solution), or just pick any custom module that always loads when your server loads and put this line in your LOAD event:

Code: Show/Hide
SetErrorMode(SEM_NOGPFAULTERRORBOX); // disable windows error report box


worst case scenerio it sets the error mode more than once, which won't hurt anyone.

Note that you won't be able to debug your modules using the Just in time debugging, as it won't prompt you for it (it'll just restart the server).
_________________
SubSpace Discretion: A Third Generation SubSpace Client
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Night_Fox
dark_mistress is too sexy for me


Age:53
Gender:Gender:Female
Joined: Jan 24 2004
Posts: 252
Offline

PostPosted: Wed Mar 09, 2005 6:49 am    Post subject: Reply to topic Reply with quote

Eeks thats really too complex for me icon_lol.gif
I think I will start learning now, as I got time in my hands sa_tongue.gif
Back to top
View users profile Send private message Add User to Ignore List
Chambahs
Guest


Offline

PostPosted: Wed Mar 09, 2005 11:19 am    Post subject: Reply to topic Reply with quote

finally, cyan can put something on his server so my zone wont be down...
Back to top
Cyan~Fire
I'll count you!
I'll count you!


Age:36
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Wed Mar 09, 2005 4:37 pm    Post subject: Reply to topic Reply with quote

Cham, there's like a 10s delay before asss times out and restarts when yours crashes. So stop complaining! icon_razz.gif
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Phyran
I privately speak in public


Gender:Gender:Male
Joined: Dec 25 2003
Posts: 280
Offline

PostPosted: Thu Mar 10, 2005 12:36 pm    Post subject: Reply to topic Reply with quote

lies! D:
Back to top
View users profile Send private message Add User to Ignore List AIM Address
D1st0rt
Miss Directed Wannabe


Age:36
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Fri Mar 11, 2005 12:04 am    Post subject: Reply to topic Reply with quote

I think the better solution is to stop zones from crashing in the first place biggrin.gif
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Custom Projects All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 625 page(s) served in previous 5 minutes.

phpBB Created this page in 0.498564 seconds : 31 queries executed (81.9%): GZIP compression disabled