1

Topic: the -f my_server_config.cfg thingy

Seriously, I just can't get it to work.

In the map teewars-0.3.3-win32, I have teewars_srv and 3 different shortcuts (three different for every gametype) with different "-f example1.cfg", and when I open one of them it says:

starting...
loading example1.cfg (this is supposed to be CTF)
server name is 'unnamed server' (I chose another name, like "Kimsans CTF server")
masterserver is 'master.teewars.com'
loading data index=8 size=164

-- Deatch Match -- (also wrong, as it was supposed to be tdm)

And in my config_directory I have the 3 different configs (+ default.cfg)

Let's look at example1.cfg:
sv_name=Kimsans CTF server
sv_gametype=ctf
sv_warmup=30
sv_map=ctf2
sv_max_clients=10
sv_scorelimit=500
sv_timelimit 0
password leif
rcon_password torleif
sv_tournament_mode 1

The config seems to load correctly by the server, and then, why doesn't it work? What the heck is wrong? Thank you, Kimsan

2

Re: the -f my_server_config.cfg thingy

the cfg file you are loading in -f should be in the same dir as your game is (not in the config dir)

3

Re: the -f my_server_config.cfg thingy

I'm having trouble as well. I can't figure out where to put the .cfg I make. I put it in "Application Data\Teewars", I put it in "C:\Program Files\teewars-0.3.3-win32", I even put it in a folder called -f to see if that is what it was looking for.

Default loads every time.

I could just keep a backup of default though, and change default to what I want I guess...

4

Re: the -f my_server_config.cfg thingy

http://i28.tinypic.com/2cr6mgi.png
-f raceserver.cfg should load raceserver.cfg

5

Re: the -f my_server_config.cfg thingy

Still not working... hmm

I can make due with changing the "default" settings around though I guess.

6 (edited by lazy_bum 2008-01-23 08:16:44)

Re: the -f my_server_config.cfg thingy

Daniel wrote:

the cfg file you are loading in -f should be in the same dir as your game is (not in the config dir)

And why is that?

~ $ whereis teewars_srv
teewars_srv: /opt/teewars/teewars_srv

~ $ cat ~/bin/teewars-dedicated.sh 
#!/bin/sh
teewars_srv -f ${HOME}/.teewars/server.cfg > ${HOME}/.teewars/server.log 2>&1

~ $ ls ~/.teewars/ | grep server.cfg
server.cfg
Kimsan wrote:

sv_tournament_mode 1

Don't know if it helps, but I think You should have "=" there. (;

7

Re: the -f my_server_config.cfg thingy

lazy_bum wrote:
Daniel wrote:

the cfg file you are loading in -f should be in the same dir as your game is (not in the config dir)

And why is that?

~ $ whereis teewars_srv
teewars_srv: /opt/teewars/teewars_srv

~ $ cat ~/bin/teewars-dedicated.sh 
#!/bin/sh
teewars_srv -f ${HOME}/.teewars/server.cfg > ${HOME}/.teewars/server.log 2>&1

~ $ ls ~/.teewars/ | grep server.cfg
server.cfg
Kimsan wrote:

sv_tournament_mode 1

Don't know if it helps, but I think You should have "=" there. (;

if you load -f server.cfg its the same dir as server is in.. he said -f server.cfg not
-f $(HOME)/.teewars/server.cfg didnt he?

8 (edited by Moriarty 2008-01-28 11:58:32)

Re: the -f my_server_config.cfg thingy

I have the same problem. Server says it loads my config but never the less it is the default that runs.
Haven't browsed either forums or code much but a quick look att the code raises a question: what if there's an error in the config file? Seems the error handling in the config load functionality is rather sparse.

I'd double check the file for unwanted characters and invalid names. But then again, haven't really looked so...

EDIT: What I mean is that if you've entered something the server config parser won't understand, you won't get any warning and defaults are loaded instead. I think.

9

Re: the -f my_server_config.cfg thingy

AFAIK:

1. All options should have an equals '=' in it.
sv_timelimit=5

2. It is easiest to place your server .cfg file in the same directory as teewars_srv.exe
teewars_srv -f example1.cfg

10

Re: the -f my_server_config.cfg thingy

If this is still current:
there have to be NO equals. Nowhere. If you had took a look in the settings.cfg at the application data, u had naticed that there are no equals ... so also no equals in the server .cfg. it works!

erninio

11

Re: the -f my_server_config.cfg thingy

erninio wrote:

If this is still current:
there have to be NO equals. Nowhere. If you had took a look in the settings.cfg at the application data, u had naticed that there are no equals ... so also no equals in the server .cfg. it works!

erninio

this thread was made before teeworlds 0.4.0 was, in earlier versions you had to use equals.