Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

2 Servers On 1 Client [UPDATE]


andy200129
 Share

Recommended Posts

**Please Comment if you have used this or liked it i want to see how many people use/like it lol and i will bring out more tutorials like this**
Tutorial Difficulty 1/5 Newb Friendly

Requirements
Visual Basics 6
EE 2.7 Source

**Video: [UPDATE]**
http://www.youtube.com/watch?v=bnDBeH4cH_0

Tutorial in Text:
Step By Step
1)Copy And Paste your Server make sure the Server - Copy is renamed to Server2
2) Copy and paste Client rename Client -copy to Test Client
3) Open Visual Basics 6  open the Client.vbp
4) open frmMainMenu add 2 buttons name them the 2 servers
5) put the code below on the buttons
6) Change the 1st button code port (0000) to the 1st servers port
7) change the 2nd button code port (0000) to the 2nd server port
8)make sure u save and compile the new client.exe into test client folder
9)run both servers Open client and test to check it works

**Code**
Yellow = change to your server ports
Red = Change to your Ip

>! Dim IP As String, Port As String
    Dim fErr As Integer
>!     Port = Val(0000)
>!     fErr = 0
    If fErr = 0 And Port <= 0 Then
        fErr = 1
        Call MsgBox("Please Fix The Port!", vbCritical, GAME_NAME)
        Exit Sub
    End If
    If fErr = 0 Then
        Call WriteINI("IPCONFIG", "PORT", 0000, (App.Path & "\config.ini"))
    End If
    Call TcpDestroy
>!     frmStable.Socket.RemotePort = 0000
**Different Computer Host**

>! Dim IP As String, Port As String
    Dim fErr As Integer
>!     IP = 000.000.000
    Port = Val(0000)
>!     fErr = 0
    If fErr = 0 And Len(Trim$(IP)) = 0 Then
        fErr = 1
        Call MsgBox("Please Fix The IP!", vbCritical, GAME_NAME)
        Exit Sub
    End If
    If fErr = 0 And Port <= 0 Then
        fErr = 1
        Call MsgBox("Please Fix The Port!", vbCritical, GAME_NAME)
        Exit Sub
    End If
    If fErr = 0 Then
        Call WriteINI("IPCONFIG", "IP", 000.000.000, (App.Path & "\config.ini"))
        Call WriteINI("IPCONFIG", "PORT", 0000, (App.Path & "\config.ini"))
    ' Call MenuState(MENU_STATE_IPCONFIG)
    End If
    Call TcpDestroy
    frmStable.Socket.RemoteHost = 000.000.000
    frmStable.Socket.RemotePort = 0000
After I Made mine i changed the graphics and now it looks like this

>! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/85193fd0c473a1da0df7fbac920e7bcc.jpg)

Please Comment Tell me if u have problems its something i thought of doing i got bored lol :)
Link to comment
Share on other sites

  • 3 weeks later...
i haven't said nothing about making the game better its to improve game play if your PC is strong enough or you have alot of server host stuff and you don't want like 1000's of people on 1 server so its hard to move about so jam packed its to expand the world of online games so it dose not get over crowded on 1 server you can have a maximum to stop alot of arguments and complaints that its hard to move around on the game because so many people are on the 1 server if you get what I'm saying
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 4 weeks later...
When I try to host with a different IP I get
Compile Error:
Expected: End Of Statement
here is what it looks like
```
Private Sub Server1_Click()
Dim IP As String, Port As String
    Dim fErr As Integer

    IP = 000.00.00.0
    Port = Val(4000)

    fErr = 0
    If fErr = 0 And Len(Trim$(IP)) = 0 Then
        fErr = 1
        Call MsgBox("Please Fix The IP!", vbCritical, GAME_NAME)
        Exit Sub
    End If
    If fErr = 0 And Port <= 0 Then
        fErr = 1
        Call MsgBox("Please Fix The Port!", vbCritical, GAME_NAME)
        Exit Sub
    End If
    If fErr = 0 Then
        Call WriteINI("IPCONFIG", "IP", 000.00.00.0, (App.Path & "\config.ini"))
        Call WriteINI("IPCONFIG", "PORT", 4000, (App.Path & "\config.ini"))
    ' Call MenuState(MENU_STATE_IPCONFIG)
    End If
    Call TcpDestroy
    frmStable.Socket.RemoteHost = 000.00.00.0
    frmStable.Socket.RemotePort = 4000
End Sub
```Note I changed my IP to 0's lol
Link to comment
Share on other sites

  • 2 weeks later...
@EclipseStalker:

> When I try to host with a different IP I get
> Compile Error:
> Expected: End Of Statement
> here is what it looks like
> ```
> Private Sub Server1_Click()
> Dim IP As String, Port As String
>     Dim fErr As Integer
>
>     IP = 000.00.00.0
>     Port = Val(4000)
>
>     fErr = 0
>     If fErr = 0 And Len(Trim$(IP)) = 0 Then
>         fErr = 1
>         Call MsgBox("Please Fix The IP!", vbCritical, GAME_NAME)
>         Exit Sub
>     End If
>     If fErr = 0 And Port <= 0 Then
>         fErr = 1
>         Call MsgBox("Please Fix The Port!", vbCritical, GAME_NAME)
>         Exit Sub
>     End If
>     If fErr = 0 Then
>         Call WriteINI("IPCONFIG", "IP", 000.00.00.0, (App.Path & "\config.ini"))
>         Call WriteINI("IPCONFIG", "PORT", 4000, (App.Path & "\config.ini"))
>     ' Call MenuState(MENU_STATE_IPCONFIG)
>     End If
>     Call TcpDestroy
>     frmStable.Socket.RemoteHost = 000.00.00.0
>     frmStable.Socket.RemotePort = 4000
> End Sub
> ```Note I changed my IP to 0's lol

if u stick to the tutorials it shouldn't have problems you must of put the wrong port or so watch and read the tutorial carefully
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...