Announcement

Collapse
No announcement yet.

Fix the "Can't Connect to Server" problem for good!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Fix the "Can't Connect to Server" problem for good!

    Right, PB has been having the problem lately of not allowing players to connect to a server first time. This can be very annoying when trying to get into a packed server.

    Thus, i have come up with a solution, create a batch file to delete the bad PB file which causes this error. Big thanks to "Septa Scarabae" for finding and telling me the code to use this by the way.

    Instructions

    1. Open up the directory where bf2.exe lives (usually in program files > EA etc...)

    2. Open "tools" -> Folder Options -> "view" tab -> Uncheck the box which says "hide extensions for known file types"

    3. Create a new text document (right click in the folder -> New -> Text document)

    4. Name the file Bf2launcher.bat (the name doesn't matter, as long as it is .bat)

    5. Copy in the following code into the file:

    Del "pb\pbns.dat"
    Start "Battlefield 2 Launcher" "BF2.exe" +menu 1 +fullscreen 1 +restart
    Exit


    The "+restart" is optional. It simply tells Bf2 to skip the movies

    6. Now undo Part 2 (Hide the file type extension)

    7. Make a shortcut of bf2launcher.bat to your desktop and run the game using that

    This now deletes the troublesome pbns.dat file before opening BF2, and thus you can connect to a server immediately. This file will be re-downloaded once you have joined the game. Always use the Bf2Launcher.bat shortcut.

    Sorted.

    Any q's?

  • #2
    Re: Fix the "Can't Connect to Server" problem for good!

    Special Forces:
    Code:
    Del "pb\pbns.dat"
    Start "Battlefield 2 Launcher" "BF2.exe" +menu 1 +fullscreen 1 +restart +modPath mods/xpack +ignoreAsserts 1
    Exit
    For widescreen:
    Code:
    Del "pb\pbns.dat"
    Start "Battlefield 2 Launcher" "BF2.exe" +menu 1 +fullscreen 1 +restart +szx 1680 +szy 1050
    Exit
    Special Forces Widescreen:
    Code:
    Del "pb\pbns.dat"
    Start "Battlefield 2 Launcher" "BF2.exe" +menu 1 +fullscreen 1 +restart +modPath mods/xpack +ignoreAsserts 1 +szx 1680 +szy 1050
    Exit
    Of course, change the resolution for widescreen to your res.

    Comment


    • #3
      Re: Fix the "Can't Connect to Server" problem for good!

      or just try and connect once.

      Comment


      • #4
        Re: Fix the "Can't Connect to Server" problem for good!

        Originally posted by alex98uk View Post
        Thus, i have come up with a solution, create a batch file to delete the bad PB file which causes this error. Big thanks to "Septa Scarabae" for finding and telling me the code to use this by the way.
        Any q's?
        Ahem I believe I first came up with that idea in the tech support forum before everyone else... A little recognition?
        Originally posted by AmericanDad
        You could always schedule a task in Windows to delete that file upon booting. Not familiar with .bat syntax but I'm sure it's pretty elementary if someone knows how to?
        Thanks for post anyway I will use it immediately.

        Comment


        • #5
          Re: Fix the "Can't Connect to Server" problem for good!

          thank you and very nice effort =)

          although i do have a question yes. and that is:

          after inputting these changes does this mean i cannot enter the game through previous desktop shortcut/DVD autorun anymore, do i have to use the new .bat one?

          is this the only way to prevent it. or is it 1 time use and then its fixed from then on? and i can resume using the old shortcut?

          Comment


          • #6
            Re: Fix the "Can't Connect to Server" problem for good!

            Originally posted by DesertFalcon View Post
            or just try and connect once.
            Not great if the server you want on only has one space every half an hour

            Comment


            • #7
              Re: Fix the "Can't Connect to Server" problem for good!

              Originally posted by alex98uk View Post
              Not great if the server you want on only has one space every half an hour
              alex mate can you please answer my query?

              Comment


              • #8
                Re: Fix the "Can't Connect to Server" problem for good!

                Originally posted by Anni-kin View Post
                after inputting these changes does this mean i cannot enter the game through previous desktop shortcut/DVD autorun anymore, do i have to use the new .bat one?
                You must use the .bat shortcut rather than the original Bf2 shortcut.
                Originally posted by Anni-kin View Post

                is this the only way to prevent it. or is it 1 time use and then its fixed from then on? and i can resume using the old shortcut?
                No, you must use the .bat shortcut from now on. You can give it the BF2 logo by right clicking on the short cut, go into properties and then select change icon. Then browse to the battlefield 2 installation folder and select the BF2 icon.
                You could delete the file manually each time, but that takes time. Hopefully, we'll be able to get rid of this .bat shortcut if PB fix it!

                Comment


                • #9
                  Re: Fix the "Can't Connect to Server" problem for good!

                  Originally posted by alex98uk View Post
                  You must use the .bat shortcut rather than the original Bf2 shortcut.


                  No, you must use the .bat shortcut from now on. You can give it the BF2 logo by right clicking on the short cut, go into properties and then select change icon. Then browse to the battlefield 2 installation folder and select the BF2 icon.
                  You could delete the file manually each time, but that takes time. Hopefully, we'll be able to get rid of this .bat shortcut if PB fix it!
                  i did know about the icon change but tyvm for the info and cheers will do - thanks again, that problem's been a pain for ages, i always thought it was my connection

                  Comment


                  • #10
                    Re: Fix the "Can't Connect to Server" problem for good!

                    Originally posted by AmericanDad View Post
                    Ahem I believe I first came up with that idea in the tech support forum before everyone else... A little recognition?
                    I didn't see you post anything about it, the other guy responded to me about it, and i asked whether it was possible to use a batch file.

                    So.... no credit for you :laugh:

                    Comment


                    • #11
                      Re: Fix the "Can't Connect to Server" problem for good!

                      Originally posted by alex98uk View Post
                      I didn't see you post anything about it, the other guy responded to me about it, and i asked whether it was possible to use a batch file.

                      So.... no credit for you :laugh:
                      He did, as did I. Task Scheduler is better than a batch file...

                      Comment


                      • #12
                        Re: Fix the "Can't Connect to Server" problem for good!

                        Originally posted by camperstrike View Post
                        He did, as did I. Task Scheduler is better than a batch file...
                        Aha! thank you camperstrike!

                        Comment


                        • #13
                          Re: Fix the "Can't Connect to Server" problem for good!

                          oh, ok. Thanks to AmericanDad as well!!!

                          Comment


                          • #14
                            Re: Fix the "Can't Connect to Server" problem for good!

                            My pet rabbit Hoppy had a part in this too!

                            He was the one who gave Digital Illusions CE. the inspiration they needed to create BF2!

                            All he did was hop around.

                            You should all praise him.

                            Comment


                            • #15
                              Re: Fix the "Can't Connect to Server" problem for good!

                              YOU dont need to do this any longer..
                              Punkbuster released an update yesterday (night), which fixed the "first time joining a server - connection problem"...

                              "Saturday 09.08.2007 [4:00PM]:

                              Comment

                              Working...
                              X