Thread: [PI]Rune-vision errors in IDE

Results 1 to 7 of 7
  1. #1 [PI]Rune-vision errors in IDE 
    Registered Member
    Join Date
    Aug 2014
    Posts
    110
    Thanks given
    47
    Thanks received
    2
    Rep Power
    11
    I'm using eclipse and using rune-vision as a base, on regular compiler no errors, but in eclipse, theres errors in almost every pakcage and half the files.


    That's all the errors, but on run and compile without eclipse, no errors, any reason why?
    and can i fix it?

    Also after i put it in eclipse, then errors show up on the run;

    Reply With Quote  
     

  2. #2  
    anInt69

    Max _'s Avatar
    Join Date
    Feb 2012
    Age
    26
    Posts
    1,801
    Thanks given
    426
    Thanks received
    727
    Rep Power
    599
    Whats at line 171 in server.java?
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Aug 2014
    Posts
    110
    Thanks given
    47
    Thanks received
    2
    Rep Power
    11
    Quote Originally Posted by MaxiiPad View Post
    Whats at line 171 in server.java?
    playerHandler.process();


    says it's not a type..
    Reply With Quote  
     

  4. #4  
    anInt69

    Max _'s Avatar
    Join Date
    Feb 2012
    Age
    26
    Posts
    1,801
    Thanks given
    426
    Thanks received
    727
    Rep Power
    599
    Change it to PlayerHandler.process(); classes are capitalized, to recognise the syntax of that line of code, right now it's looking for a playerHandler declaration in the server class, which doesn't exist.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Aug 2014
    Posts
    110
    Thanks given
    47
    Thanks received
    2
    Rep Power
    11
    Quote Originally Posted by MaxiiPad View Post
    Change it to PlayerHandler.process(); classes are capitalized, to recognise the syntax of that line of code, right now it's looking for a playerHandler declaration in the server class, which doesn't exist.
    Still says it cannot be resolved :/
    Reply With Quote  
     

  6. #6  
    anInt69

    Max _'s Avatar
    Join Date
    Feb 2012
    Age
    26
    Posts
    1,801
    Thanks given
    426
    Thanks received
    727
    Rep Power
    599
    Quote Originally Posted by Hotty12172 View Post
    Still says it cannot be resolved :/
    Show me the error

    And screenshot the main method

    And your imports
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Aug 2014
    Posts
    110
    Thanks given
    47
    Thanks received
    2
    Rep Power
    11
    Theres errors in almost all of the files :L ill just show you my 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.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;
    
    /**
     * Server.java
     *
     * @author Sanity
     * @author Graham
     * @author Blake
     * @author Ryan Lmctruck30
     *
     */
    
    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 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 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];
    	//private static final WorkerThread engine = new WorkerThread();
    	
    	static {
    		if(!Config.SERVER_DEBUG) {
    			serverlistenerPort = 43594;
    		} else {
    			serverlistenerPort = 43594;
    		}
    		cycleRate = 575;
    		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 {
    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 Rune-Vision...");
    		//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 listening on port 0.0.0.0:" + 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);
    			if (System.currentTimeMillis() - lastMassSave > 25000) {
    					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();
    			System.out.println("A fatal exception has been thrown!");
    			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);
    	}
    	
    	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;
    	}
    	
    }

    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. Replies: 12
    Last Post: 04-22-2018, 08:09 AM
  2. Replies: 8
    Last Post: 10-30-2011, 05:43 AM
  3. Replies: 5
    Last Post: 07-24-2011, 03:20 PM
  4. [PI]-DSPK- Freezes/Errors in PK
    By Floof of light in forum Help
    Replies: 4
    Last Post: 04-23-2011, 08:16 PM
  5. Replies: 0
    Last Post: 01-15-2011, 06:45 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •