I fixed my last error (trying to find initialize() { and destruct() {) (They were in a different .java) Anyways, I successfully finished coding in RobGobās Control Panel, except when I compile I get 100 Errors, and when I run server, it says āloaded āxxxā in āxxxā msā āStarting Serverā and then it gives me the errors in the picture below and then the console just clears and does it again repeatedly. I thought Iād still be able to play, but when I press ālog inā I get āError Connecting to Serverā.
NOTE: When I run server, the control panel doesnāt load up, only the console opens up. (And Iāve checked and re-checked my entries)
Run Server Error
You already have something running on the port. Make sure thereās nothing else blocking it. Like another server.
Check your task manager for java.exe to see if a server is running. (IDEās like eclipse also just java in the task manager, so donāt exit that).
[quote=āsk8rdude461, post:2, topic:555659ā]You already have something running on the port. Make sure thereās nothing else blocking it. Like another server.
Check your task manager for java.exe to see if a server is running. (IDEās like eclipse also just java in the task manager, so donāt exit that).[/quote]I feel stupidā¦ I put utorrent on that port. Wow. Thank you for all of your help, btw. Iām gonna credit you when I finish this. Youve done a lot. Any way I can vouch for you?
Also, do you know why the panel isnt opening?
[quote=āwimbow, post:3, topic:555659ā][quote author=sk8rdude461 link=topic=674869.msg4509809#msg4509809 date=1466377643]
You already have something running on the port. Make sure thereās nothing else blocking it. Like another server.
Check your task manager for java.exe to see if a server is running. (IDEās like eclipse also just java in the task manager, so donāt exit that).
[/quote]I feel stupidā¦ I put utorrent on that port. Wow. Thank you for all of your help, btw. Iām gonna credit you when I finish this. Youve done a lot. Any way I can vouch for you?
Also, do you know why the panel isnt opening?[/quote]
What does your Server.java look like?
Oh and for utorrent. Run the server first, then put utorrent on 43594. You may have to restart the server after setting utorrent, but it should work.
Itās a strange procedure. Itās typically easier to portforward.
[quote=āsk8rdude461, post:4, topic:555659ā][quote author=wimbow link=topic=674869.msg4509811#msg4509811 date=1466378411]
What does your Server.java look like?
Oh and for utorrent. Run the server first, then put utorrent on 43594. You may have to restart the server after setting utorrent, but it should work.
Itās a strange procedure. Itās typically easier to portforward.[/quote]
Thanks for the info on utorrent. I canāt portforward because my router (hitron) cancelled that feature (meaning you have to buy your OWN, my dad works cable so he got the warehouses for free) so I canāt really do it but anyways, here is my entire Server.java:
[code]package server;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.text.DecimalFormat;
import org.apache.mina.common.IoAcceptor;
import org.apache.mina.transport.socket.nio.SocketAcceptor;
import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
import server.event.EventManager;
import server.util.ControlPanel;
import server.model.npcs.NPCHandler;
import server.model.npcs.NPCDrops;
import server.model.players.PlayerHandler;
import server.model.players.Player;
import server.model.players.Client;
import server.model.players.PlayerSave;
import server.model.minigames.*;
import server.net.ConnectionHandler;
import server.net.ConnectionThrottleFilter;
import server.util.ShutDownHook;
import server.util.SimpleTimer;
import server.util.log.Logger;
import server.event.Event;
import server.event.EventContainer;
import server.world.ItemHandler;
import server.world.ObjectHandler;
import server.world.ObjectManager;
//import server.util.MadTurnipConnection;
import server.world.ShopHandler;
import server.world.map.VirtualWorld;
import server.world.ClanChatHandler;
import server.world.WorldMap;
import server.world.WalkingHandler;
@SuppressWarnings(āunusedā)
public class Server {
public static boolean sleeping;
public static int cycleRate;
public static boolean UpdateServer = false;
public static long lastMassSave = System.currentTimeMillis();
private static IoAcceptor acceptor;
private static ConnectionHandler connectionHandler;
private static ConnectionThrottleFilter throttleFilter;
private static SimpleTimer engineTimer, debugTimer;
private static long cycleTime, cycles, totalCycleTime, sleepTime;
private static DecimalFormat debugPercentFormat;
public static boolean shutdownServer = false;
public static boolean shutdownClientHandler;
public static int serverlistenerPort;
public static ItemHandler itemHandler = new ItemHandler();
public static ControlPanel panel = new ControlPanel(true); // false if you want it off
public static PlayerHandler playerHandler = new PlayerHandler();
public static NPCHandler npcHandler = new NPCHandler();
public static ShopHandler shopHandler = new ShopHandler();
public static ObjectHandler objectHandler = new ObjectHandler();
public static ObjectManager objectManager = new ObjectManager();
public static CastleWars castleWars = new CastleWars();
public static FightPits fightPits = new FightPits();
public static PestControl pestControl = new PestControl();
public static int days, hours, minutes, secundes;
public static NPCDrops npcDrops = new NPCDrops();
public static ClanChatHandler clanChat = new ClanChatHandler();
public static FightCaves fightCaves = new FightCaves();
public static RFD rfd = new RFD();
//public static WorldMap worldMap = new WorldMap();
public static long[] TIMES = new long[5];
public static void shutdown() {
shutdownServer = true;
System.exit(0);
}
//private static final WorkerThread engine = new WorkerThread();
static {
if(!Config.SERVER_DEBUG) {
serverlistenerPort = 43594;
} else {
serverlistenerPort = 43594;
}
cycleRate = 474;
shutdownServer = false;
engineTimer = new SimpleTimer();
debugTimer = new SimpleTimer();
sleepTime = 0;
debugPercentFormat = new DecimalFormat("0.0#%");
}
//height,absX,absY,toAbsX,toAbsY,type
/*public static final boolean checkPos(int height,int absX,int absY,int toAbsX,int toAbsY,int type)
{
return I.I(height,absX,absY,toAbsX,toAbsY,type);
}*/
public static void main(java.lang.String args[]) throws NullPointerException, IOException {
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
for(Player p : PlayerHandler.players) {
if(p == null)
continue;
System.out.println("Saving all players...");
PlayerSave.saveGame((Client)p);
}
}
});
try {
WalkingHandler.getSingleton().initialize();
} catch(Exception ex) {
ex.printStackTrace();
}
/**
* Starting Up Server
*/
System.setOut(new Logger(System.out));
System.setErr(new Logger(System.err));
System.out.println("Launching EverScape - Dax");
//MadTurnipConnection md = new MadTurnipConnection();
//md.start();
/**
* World Map Loader
*/
//if(!Config.SERVER_DEBUG)
//VirtualWorld.init();
//WorldMap.loadWorldMap();
/**
* Script Loader
*/
//ScriptManager.loadScripts();
/**
* Accepting Connections
*/
acceptor = new SocketAcceptor();
connectionHandler = new ConnectionHandler();
SocketAcceptorConfig sac = new SocketAcceptorConfig();
sac.getSessionConfig().setTcpNoDelay(false);
sac.setReuseAddress(true);
sac.setBacklog(100);
throttleFilter = new ConnectionThrottleFilter(Config.CONNECTION_DELAY);
sac.getFilterChain().addFirst("throttleFilter", throttleFilter);
acceptor.bind(new InetSocketAddress(serverlistenerPort), connectionHandler, sac);
/**
* Initialise Handlers
*/
//VoteForCash.createConnection();
EventManager.initialize();
Connection.initialize();
//PlayerSaving.initialize();
//MysqlManager.createConnection();
/**
* Clipped Following (NPC)
*/
try {
WalkingHandler.getSingleton().initialize();
} catch(Exception ex) {
ex.printStackTrace();
}
/**
* Server Successfully Loaded
*/
System.out.println("Server online on port:" + serverlistenerPort);
/**
* Main Server Tick
*/
try {
while (!Server.shutdownServer) {
if (sleepTime > 0)
Thread.sleep(sleepTime);
engineTimer.reset();
itemHandler.process();
playerHandler.process();
npcHandler.process();
shopHandler.process();
objectManager.process();
fightPits.process();
pestControl.process();
cycleTime = engineTimer.elapsed();
if(cycleTime < 575)
sleepTime = cycleRate - cycleTime;
else
sleepTime = 0;
totalCycleTime += cycleTime;
cycles++;
debug();
if(Config.SERVER_DEBUG) //i see.... i used wrong symbol lol LOL !
//System.out.println(cycleTime+"--"+sleepTime);
secundes++;
if(secundes == 120){
minutes++;
secundes = 0;
}
if(minutes == 60){
hours++;
minutes = 0;
}
if(hours == 24){
days++;
hours = 0;
}
if(hours == 2 && minutes == 0 && secundes == 20){
PlayerHandler.updateSeconds = 60;
PlayerHandler.updateAnnounced = false;
PlayerHandler.updateRunning = true;
PlayerHandler.updateStartTime = System.currentTimeMillis();
}
if(UpdateServer) {
if (System.currentTimeMillis() - PlayerHandler.updateStartTime > 15000) {
System.gc();
Server.shutdown();
}
}
if (System.currentTimeMillis() - lastMassSave > 10000000) {
for(Player p : PlayerHandler.players) {
if(p == null)
continue;
PlayerSave.saveGame((Client)p);
System.out.println("Saved game for " + p.playerName + ".");
lastMassSave = System.currentTimeMillis();
}
}
}
} catch (Exception ex) {
ex.printStackTrace();
for(Player p : PlayerHandler.players) {
if(p == null)
continue;
PlayerSave.saveGame((Client)p);
System.out.println("Saved game for " + p.playerName + ".");
}
}
acceptor = null;
connectionHandler = null;
sac = null;
System.exit(0);
}
@SuppressWarnings("static-access")
public static void processAllPackets() {
for (int j = 0; j < playerHandler.players.length; j++) {
if (playerHandler.players[j] != null) {
while(playerHandler.players[j].processQueuedPackets());
}
}
}
public static boolean playerExecuted = false;
private static void debug() {
if (debugTimer.elapsed() > 360*1000 || playerExecuted) {
long averageCycleTime = totalCycleTime / cycles;
System.out.println("Average Cycle Time: " + averageCycleTime + "ms");
double engineLoad = ((double) averageCycleTime / (double) cycleRate);
System.out.println("Players online: " + PlayerHandler.playerCount+ ", engine load: "+ debugPercentFormat.format(engineLoad));
totalCycleTime = 0;
cycles = 0;
System.gc();
System.runFinalization();
debugTimer.reset();
playerExecuted = false;
}
}
public static long getSleepTimer() {
return sleepTime;
}
}
[/code]
Iām not seeing anything thatād directly contribute to the control panel not showing.
When you load the server does it show a message like:
"[Console]: Control Panel disabled."
in the console?
I was skyping with robgob. I sent over my client and source and cache and he told me there were missing methods. he fixed it and sent it back so we are good-o