Help getting Players Online

Hello

Today, I spent attempting to get a Server online.

I created a ‘No-Ip’ & have Portforwarded with my Router. I have checked too see if my Port is open on 43594 and it says it’s Online.

I have downloaded the Client Jar File I made onto my other computer to test too see if it is online and it says ‘Error connecting to Server’.

Why would this be? When I run the Server on my Hosting PC it lets me login, but when I try and login on my other computer or friends computer it doesn’t let me?

I was a bit confused with the IP changing that needed to be done in the Client & Source and was confused whether it had to be ‘127.0.0.1’ or my Default Gateway or ‘No-Ip’ Address…

What am I doing wrong and how can I resolve this?

Help will be greatly appreciated.

You don’t need a no-ip, unless your IP address changes frequently.

Make sure your server is running when you’re checking if the port is open, and that it does say open (still).

When you’re on the same computer as the server, you should set the client’s IP to localhost, or 127.0.0.1

When it’s on a different computer, you should set it to your ip address seen here or your no-ip if you’re using that.

If your other computer is still having an issue connecting to the server, try setting the IP address in the client to the same one you used to portforward with (your local network IP).

[quote=“sk8rdude461, post:2, topic:555694”]You don’t need a no-ip, unless your IP address changes frequently.

Make sure your server is running when you’re checking if the port is open, and that it does say open (still).

When you’re on the same computer as the server, you should set the client’s IP to localhost, or 127.0.0.1

When it’s on a different computer, you should set it to your ip address seen here or your no-ip if you’re using that.

If your other computer is still having an issue connecting to the server, try setting the IP address in the client to the same one you used to portforward with (your local network IP).[/quote]

Thanks for your reply.

I set the 'server = ’ to 127.0.0.1 and I’m able to login on my Hosting PC.

Sorry this may sound stupid, but how can I make it so the 2 IP Addresses are in the code?

As if I leave it at 127.0.0.1 and release the client to my friend he won’t be able to get online, will he?

How can I make it so I can get on my computer and then he can get online at the same time?

Sorry if this sounds a bit confusing.

[quote=“JPOnline, post:3, topic:555694”][quote author=sk8rdude461 link=topic=674907.msg4510028#msg4510028 date=1466970768]
You don’t need a no-ip, unless your IP address changes frequently.

Make sure your server is running when you’re checking if the port is open, and that it does say open (still).

When you’re on the same computer as the server, you should set the client’s IP to localhost, or 127.0.0.1

When it’s on a different computer, you should set it to your ip address seen here or your no-ip if you’re using that.

If your other computer is still having an issue connecting to the server, try setting the IP address in the client to the same one you used to portforward with (your local network IP).
[/quote]

Thanks for your reply.

I set the 'server = ’ to 127.0.0.1 and I’m able to login on my Hosting PC.

Sorry this may sound stupid, but how can I make it so the 2 IP Addresses are in the code?

As if I leave it at 127.0.0.1 and release the client to my friend he won’t be able to get online, will he?

How can I make it so I can get on my computer and then he can get online at the same time?

Sorry if this sounds a bit confusing.[/quote]

2 solutions:

  1. Make two client.jar files. One with it set to localhost (I’d name it like clientlocal.jar) and one set to your IP from the site mentioned earlier.
    You’d give people the second jar file, while keeping the first one for yourself.
    This is the easier of the two options, hence why it’s listed first.

  2. Add a new button onto the login screen, or a string to change the IP, or similar method.
    This is a bit harder, and how to do it can vary from client to client.
    But generally, you’d copy one of the existing buttons and replace the text, and give it a new location.
    Then you’d make a boolean that would be set true/false by clicking the button. When true, the connecting ip would be localhost, when false, it wouldn’t.

Or you’d display the server IP in a string (Copy the “Username” or “Password” field).
Then whenever the player hits login the client would use whatever was displayed as the login ip.