Gmod Server, Start-up batch file

This is my gmod server start-up bat file:

@echo off
cd c:\srcds/orangebox
echo Starting game server.
echo Beginning “Garry’s Mod”
srcds.exe -console -game garrysmod +map rp_downtown_v4e_fix +maxplayers 16 +gamemode “darkrp”
echo “Garry’s Mod” has now started.
echo It is recommended that you start Server Crash Recovery aswell.

Everytime I run it though its a instant crash. Any ideas on how to fix it?

Hi Xanicon,
Try this bat file.


@echo off
cd c:\srcds\orangebox
cls
echo Protecting srcds from crashes...
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title srcds Watchdog
:srcds
echo (%time%) srcds started.
start srcds.exe -console -game "garrysmod" +exec "server.cfg" +map rp_downtown_v4e_fix +maxplayers 16
echo (%time%) WARNING srcds closed or crashed, restarting.
goto srcds

I find using an autoexec file help keep things neat
If you don’t know what the autoexec.cfg is it’s an extra server.cfg


//autoexec.cfg
gamemode "darkrp"

If you don’t have a autoexec.cfg you will need to make one in your cfg folder.

Regards Nipah.

This guy is trolling, use his code but remove :srcds and goto srcds. That will emerge infinite windows and your pc will crash.

Use this code fill the information :

@echo off
cd c: ------------------->Addres of your game
cls
echo Protecting srcds from crashes…
echo If you want to close srcds and this script, close the srcds window and type Y depending on your language followed by Enter.
title srcds
echo srcds started.
start srcds.exe -console -game “garrysmod” +exec “server.cfg” +map NAMEOFTHEMAP +maxplayers 16 +gamemode NAMEOFTHEGAMEMODE