Page 1 of 2

### Problem with localhost:Fixed. Now just setting everything

Posted: Mon Jun 25, 2007 10:11 pm
I'm having problems with using localhost. I can do random maps fine, but when I attempt to do the same with one of my levels I'm screwing around with, it won't connect and will either just freeze or say error connecting to server. Trying again with random map works perfectly.

Also, weirder still, when I try to load a different level other than the one I named testing, they don't show up. It only shows testing and random map as choices.

I'm running Windows XP with 2.0.8.

I can't figure it out

Posted: Tue Jun 26, 2007 1:12 am
Have you checked - with a fine tooth comb - the syntax of your maps? Try commenting out any code that might be questionable.

Also, have you tried using a map that you KNOW works elsewhere on your localhost?

Posted: Tue Jun 26, 2007 1:19 am
Are you trying to run the server from the Start Server menu in the game? There is (was) a bug in the client that preventing it from showing every map in the worlds directory.

Posted: Tue Jun 26, 2007 3:01 pm
Syntax?
I'm using BZEdit, and I have no clue what syntax is.
And what do you mean "elsewhere" on my localhost.

Posted: Tue Jun 26, 2007 3:21 pm
I'm using BZEdit, and I have no clue what syntax is.
I mean open up the resulting map in a text editor like notepad, and have a look at it.
And what do you mean "elsewhere" on my localhost.
Ah, that didn't come out quite the way I meant it. I mean that you should go to a public server with a working map, save the map, and run the saved map on your localhost server.

Looking at your first post again, are you starting bzfs from the command line with the -world option?

Posted: Wed Jun 27, 2007 5:37 pm
Well, I went over the world (turned into txt, right?). I found no errors. Everything was good. I changed it back to BZW format, but even when I removed everything else in the folder, I couldn't find it. It only had random map .

Posted: Wed Jun 27, 2007 5:55 pm

Posted: Wed Jun 27, 2007 8:51 pm
Especially that command line bit.

From your posts, I think you are a bit confused about how maps work. ALL maps come in the form of plain text. I don't care what you made it in. They might import images, but the base map is a big text file.

To start a server, you need to be opening a command prompt. (click start --> run and put the letters: cmd hit enter.)

I'm a bit fuzzy in Windows, but you need to input a command something like:

Code: Select all

bzfs -world \path\to\map\file
If you have no clue what I'm talking about, do a search with your Internet search engine of choice on something like: "dos tutorial" or "windows command line tutorial" There's a base of knowledge that you need to have to even be able to run any sort of server other than a random map. It's not terribly difficult, but be prepared to spend the next week's evenings reading and practicing.

If you ARE clued in on how the command line bit works, you'll need to tell us what you're typing in.

Posted: Thu Jun 28, 2007 6:26 pm
Ok, so I put that code in to the command prompt and it said exactly this:

Code: Select all

'bzfs' is not a recognized as an internal or external command, operatable program or batch file.
I'm reading about the command line right now. What exactly do I need to know about on it? I'll check my directory is correct, and post later.

Posted: Thu Jun 28, 2007 8:41 pm
You would need to cd into the directory bzfs is in, or use the full path to it.

Posted: Fri Jun 29, 2007 2:09 am
Sorry I can't tell you 'what exactly you need to know' there is a basic set of skills you'll need to get together to use it. Otherwise, you'll just end up aping some commands, and have no real clue what they mean. For starters, you should be able to navigate around your computer using your command line interface with ease, be able to modify text files, and understand what PATH is. (hint: the reason bzfs isn't recognized as a command is because it isn't in your path) Keep at it with the tutorials, you'll get it soon enough, and be better for it.

Oh, if you're really frustrated with the DOS command line interface that comes with Windows, have a look at Cygwin. The BASH shell blows DOS right out of the water IMHO.

Posted: Fri Jun 29, 2007 2:28 pm
I think you might have a simple problem like the wrong port.
If you did not specifcly set a port in your config, make sure it is 5154 , also make sure you spell localhost correctly

Posted: Fri Jun 29, 2007 3:13 pm
Make sure you have saved the file as a '.bzw' file. Without the extension bzflag will not list it. Also the command line that LongHair posted might not work in windows. It should be something like:

C:\Program Files\BZFlag2.0.8\bzfs .exe -world <path>
you should probably use the absolute path for the map file as well.
Like:
C:\path\to\world\file.bzw

Posted: Fri Jun 29, 2007 5:12 pm
Thanks, anomaly that looks more like the commands I remember from my Windows days.

Do be careful though, if you are running a version of BZFlag that isn't 2.0.8, the directory won't be the same. (on the other hand, if you're not running 2.0.8, why the heck not?)

### localhost vs 127.0.0.1

Posted: Sat Jun 30, 2007 12:31 am
Try using 127.0.0.1 instead of localhost.

I vaguely remember some systems have problems resolving 'localhost' but it works with the IP.

HTH

Posted: Sat Jun 30, 2007 1:06 am
Longhair wrote:Thanks, anomaly that looks more like the commands I remember from my Windows days.
yeah I still have to use windows at work. I'm not fond of that OS.

Btw, 127.0.0.1 (the loopback address) is not always in the hosts file on Windows. Using the address directly instead of localhost will always work. Good point Thumper.

Posted: Sun Jul 01, 2007 5:56 am
You can also put your map file in the My Bzflag Files folder. Then open the command prompt and type:

Code: Select all

cd C:\Program Files\Bzflag2.0.8
Hit enter.
That's the default path. If you installed Bzflag in another folder, just put the path to that folder. After you have done that, make sure you map file and BZFS are in the Bzflag2.0.8 folder. In the command prompt, type:

Code: Select all

bzfs.exe -world nameofyourmap.bzw
Hit enter.
Open a Bzflag client. Type localhost for the server and 5154 for the port. If you are using a router, I think you have to use Port Forwarding (but I'm not sure). Join the map and you will be able to play on it. You won't have any admin perms. You have to use a config file and set a password if you want to.

Posted: Sun Jul 01, 2007 8:43 pm
Put this command into AUTOEXEC.BAT and reboot:

Code: Select all

set path C:\Program Files\BZFlag2.0.8
This command looks for executables at startup. Then run:

Code: Select all

bzfs.exe -world nameofyourmap.bzw
No more having to run the blasted "cd" command when starting your server . Thank goodness for an old DOS 5.0 manual I had kicking around.

Oh, BTW, DO NOT close the DOS window down! It looks like it might be doing nada, but that window is what keeps your server running.

Posted: Mon Jul 02, 2007 2:33 am
urbanracer34 wrote:Put this command into AUTOEXEC.BAT and reboot:

Code: Select all

set path C:\Program Files\BZFlag2.0.8
whoa there!,,, don't do that, you'll replace the previous path var, and that can cause problems on boot... instead make it...

Code: Select all

set path %PATH%; C:\Program Files\BZFlag2.0.8
that should append the directory to the path var instead of replacing it.

Posted: Mon Jul 02, 2007 8:11 am
Just use
cd C:\...
It will change the directory. Then, you don't have to enter the path for your BZFS.EXE and your map file (if they are both in the ...) There is no risk of boot problems (I hope ).

Posted: Fri Aug 03, 2007 10:23 pm
anomaly wrote:Make sure you have saved the file as a '.bzw' file. Without the extension bzflag will not list it. Also the command line that LongHair posted might not work in windows. It should be something like:

C:\Program Files\BZFlag2.0.8\bzfs .exe -world <path>
you should probably use the absolute path for the map file as well.
Like:
C:\path\to\world\file.bzw
So files downloaded the end in .map need to be renamed to .bzw ?
IF so why even name them .map and if not how do you get them to run ?
'THanks
Mark

Posted: Sat Aug 04, 2007 12:27 am
BZFlag worlds should be named .bzw, not .map. Some old ones are named .map; we changed bzfs to warn in this case to make things more consistent.

Posted: Mon Aug 06, 2007 10:17 am
When running servers on windows, i find the easiest way to do it is to just open up notepad, type in my "bzfs -world /path/to/map.bzw", press enter, then type "pause" (useful for when you come up with errors), then save it in your bzflag 2.0.8 directory as server.bat or something like that. Batch files make life easier, i dont have to retype code for everything and if i need to change the map i can just edit the file.

Posted: Thu Aug 09, 2007 8:25 pm
Thanks for all the help.
saber
EDIT AGAIN!: Im so stupid...Forgot to put the file in BZFlag2.0.8

Posted: Thu Aug 09, 2007 8:32 pm
What else did it say on the "bad arguement" line?