Crash recovery

my sever had a few crashes over last 2 days so i tried server recovery :

@echo off
cls
echo Protecting srcds from crashes…
echo If you want to close srcds, close the srcds window and type Y depending on your language followed by Enter.
title Server Watchdog
:srcds
echo (%time%) srcds started.
start srcds.exe -console -game garrysmod +gamemode “terrortown” -tickrate 66 +map ttt_67thway_v4 +maxplayers 32
echo (%time%) WARNING: srcds closed or crashed, restarting.
goto srcds

BUT when i open this it spams open servers till server overloads any ideas ?

FIXED = REMOVE START FROM 8TH LINE :slight_smile:


(User was banned for this post ("wrong section" - postal))

I maybe wrong but doesnt goto srcds make it go back to :srcds and then it does echo (%time%) srcds started.
start srcds.exe -console -game garrysmod +gamemode “terrortown” -tickrate 66 +map ttt_67thway_v4 +maxplayers 32
echo (%time%) WARNING: srcds closed or crashed, restarting. all over again

You might need to update the server, sometimes a bin file gets corrupted by something and the update with -verify will help fix that.

doing that now and yes it dont stop at server start :S

It’s “start /wait”, not just “start”

Otherwise, the command prompt will just keep starting SrcDS then looping back to the beginning of the function.

He said he already fixed it in the OP :slight_smile:

Doesn’t mean it isn’t good to know what it was that went wrong with the script he had :v:

He already said how he fixed it?