Raised This Month: $12 Target: $400
 3% 

Multiple Server Setup - Unknown command "sm_cvar" - Only After Multiple CFG Files


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MonkeyDrone
AlliedModders Donor
Join Date: Jul 2011
Old 07-13-2011 , 13:55   Multiple Server Setup - Unknown command "sm_cvar" - Only After Multiple CFG Files
Reply With Quote #1

I have a server.cfg file full of sm_cvar commands and when I run a server through ./srcds_run , the server starts up and executes all the commands appropriately and the server is working fine.

If I try to keep server.cfg empty and put in the server command line +exec server1.cfg

./srcds_run +exec server1.cfg
The command gives me Unknown command "sm_cvar" when it's executing the commands from server1.cfg

I want to run same two servers for left4dead2 but with adjustments in sm_cvar values. Thus I'm looking at server1.cfg & server2.cfg for server 1 & 2 respectively.

The executable command is working fine but srcds_run is not loading it's own set of commands into memory before executing server1.cfg.
After all, If i keep it server.cfg, The server works fine.

Any idea what's wrong here or how can we counter the dilemma.

Thanks.
MonkeyDrone is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 07-13-2011 , 14:30   Re: Multiple Server Setup - Unknown command "sm_cvar" - Only After Multiple CFG Files
Reply With Quote #2

exec on the command line runs it directly after the server is started, before SourceMod is loaded.
server.cfg is executed after everything is loaded and the map has started.
__________________
asherkin is offline
MonkeyDrone
AlliedModders Donor
Join Date: Jul 2011
Old 07-13-2011 , 14:35   Re: Multiple Server Setup - Unknown command "sm_cvar" - Only After Multiple CFG Files
Reply With Quote #3

I figured as much.

Let's say I want to run Server A & B.
Only Difference between them both would be the difficulty Level.

How do I Achieve that?

If I manually change difficulty on Server B after launch, it will reset after map has changed because it will load the server.cfg stating difficulty to be Easy.

Any ideas?

thanks @ asherkin.
MonkeyDrone is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 07-13-2011 , 14:36   Re: Multiple Server Setup - Unknown command "sm_cvar" - Only After Multiple CFG Files
Reply With Quote #4

+servercfgfile "server1.cfg"
__________________
My Plugins
Spray Tracer by Nican, maintained by me
Simple TK Manager
DoD:S Admin Weapons

Links
Resistance and Liberation (A HL2 Multiplayer Modification)
Lebson506th is offline
MonkeyDrone
AlliedModders Donor
Join Date: Jul 2011
Old 07-13-2011 , 15:17   Re: Multiple Server Setup - Unknown command "sm_cvar" - Only After Multiple CFG Files
Reply With Quote #5

Quote:
Originally Posted by Lebson506th View Post
+servercfgfile "server1.cfg"

Thanks, That command has done the job.

Servers are now online & In Testing with their own tweaks
MonkeyDrone is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:48.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode