Thread: server shutdown on startup

Results 1 to 5 of 5
  1. #1 server shutdown on startup 
    Registered Member haydar25's Avatar
    Join Date
    Jul 2011
    Posts
    325
    Thanks given
    3
    Thanks received
    0
    Rep Power
    1
    well on my server when i start it up it immediately shuts down this is the code I have.

    Code:
    		try {
    			while (!Server.shutdownServer) {
    				if (sleepTime >= 0)
    					Thread.sleep(sleepTime);
    				else
    				Thread.sleep(575);
    				engineTimer.reset();
    				itemHandler.process();
    				CycleEventHandler.getSingleton().process();
    				playerHandler.process();
    				npcHandler.process();
    			//	fightPits.process();
    				pestControl.process();
    				shopHandler.process();
    				objectManager.process();
                    PlayerAssistant.process();
                    long cycleTime = engineTimer.elapsed();
                    if(cycleTime < 575)
                        sleepTime = cycleRate - cycleTime;
                    else
                        sleepTime = 0;
    				totalCycleTime += cycleTime;
    				cycles++;
    				debug();
    				if (System.currentTimeMillis() - lastMassSave > 300000) {
    					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) {
    			System.out.println("A fatal exception has been thrown!");
    			ex.printStackTrace();
    			for(Player p : PlayerHandler.players) {
    				if(p == null)
    					continue;
    				if (p.inTrade) {
                        ((Client)p).getTradeAndDuel().declineTrade();
    					System.out.println(p.playerName+" was trading and has just been saved :)");
                    }
    				PlayerSave.saveGame((Client)p);
    				System.out.println("Saved game for " + p.playerName + ".");
    			}
    		}
    		acceptor = null;
    		connectionHandler = null;
    		sac = null;
    		System.exit(0);
    	}
    New server soon; Hybrid-Realm 614
    Reply With Quote  
     

  2. #2  
    Registered Member haydar25's Avatar
    Join Date
    Jul 2011
    Posts
    325
    Thanks given
    3
    Thanks received
    0
    Rep Power
    1
    bump
    New server soon; Hybrid-Realm 614
    Reply With Quote  
     

  3. #3  
    Community Veteran

    George's Avatar
    Join Date
    Mar 2009
    Posts
    7,059
    Thanks given
    2,100
    Thanks received
    2,939
    Rep Power
    5000
    Quote Originally Posted by haydar25 View Post
    bump
    Code:
    		System.exit(0);
    Rofl.


    Reply With Quote  
     

  4. Thankful user:


  5. #4  
    Registered Member
    Join Date
    May 2013
    Age
    23
    Posts
    15
    Thanks given
    0
    Thanks received
    2
    Rep Power
    11
    Quote Originally Posted by sponjebubu View Post
    Code:
    		System.exit(0);
    Rofl.
    Isn't that within the catch block though?

    Do you get any errors when your server shuts down?
    If it shuts down right away, add "pause" at the end of the batch file so it would show any errors if there are.
    Reply With Quote  
     

  6. #5  
    Registered Member haydar25's Avatar
    Join Date
    Jul 2011
    Posts
    325
    Thanks given
    3
    Thanks received
    0
    Rep Power
    1
    I removed the system.exit and it still happens and yes I have pause at the end and it doesn't show error messages.
    When I run my server this pops up in the CMD.

    Code:
    New npc sound: 1, 418, 72, 70
    New npc sound: 2, 418, 72, 70
    New npc sound: 3, 418, 72, 70
    New npc sound: 4, 418, 73, 71
    New npc sound: 5, 418, 73, 71
    New npc sound: 6, 418, 73, 71
    New npc sound: 49, 34, 122, 121
    New npc sound: 51, 117, 119, 118
    New npc sound: 52, 117, 119, 118
    New npc sound: 53, 115, 116, 118
    New npc sound: 54, 115, 116, 118
    New npc sound: 55, 115, 116, 118
    New npc sound: 73, 148, 146, 147
    New npc sound: 74, 148, 146, 147
    New npc sound: 75, 148, 146, 147
    New npc sound: 76, 148, 146, 147
    New npc sound: 81, 4, 3, 5
    New npc sound: 82, 47, 46, 45
    New npc sound: 83, 47, 46, 45
    New npc sound: 86, 16, 17, 15
    New npc sound: 90, 108, 110, 109
    New npc sound: 91, 108, 110, 109
    New npc sound: 92, 108, 110, 109
    New npc sound: 93, 108, 110, 109
    New npc sound: 99, 34, 36, 35
    New npc sound: 100, 123, 124, 125
    New npc sound: 101, 123, 124, 125
    New npc sound: 102, 123, 124, 125
    New npc sound: 103, 56, 58, 57
    New npc sound: 104, 56, 58, 57
    New npc sound: 105, 20, 18, 19
    New npc sound: 117, 56, 54, 55
    New npc sound: 110, 56, 54, 55
    New npc sound: 111, 56, 54, 55
    New npc sound: 112, 56, 54, 55
    New npc sound: 497, 56, 58, 57
    New npc sound: 677, 47, 46, 45
    New npc sound: 708, 64, 62, 63
    New npc sound: 709, 64, 62, 63
    New npc sound: 749, 56, 58, 57
    New npc sound: 941, 115, 116, 118
    New npc sound: 951, 153, 151, 152
    New npc sound: 1531, 64, 62, 63
    New npc sound: 1549, 56, 58, 57
    [4-5-13 11:33]: Starting up InfinityScape.
    [4-5-13 11:33]: InfinityScape successfully started, current server port:43594
    Press any key to continue . . .
    New server soon; Hybrid-Realm 614
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [Delta 317] Server Freezes on Startup
    By Excel4 in forum Help
    Replies: 0
    Last Post: 06-27-2011, 06:23 AM
  2. SERVER STUCK ON STARTUP --- error inside
    By lewis0001 in forum Help
    Replies: 21
    Last Post: 05-20-2011, 08:59 PM
  3. Replies: 2
    Last Post: 10-13-2010, 06:58 PM
  4. [Req]Danger, safe and server title on screen![Req]
    By Grim Line in forum Tutorials
    Replies: 2
    Last Post: 09-27-2007, 06:04 PM
  5. Replies: 6
    Last Post: 06-28-2007, 06:58 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •