Thread: Arios 498 Compiling error

Results 1 to 3 of 3
  1. #1 Arios 498 Compiling error 
    Registered Member
    Join Date
    Dec 2013
    Age
    30
    Posts
    19
    Thanks given
    5
    Thanks received
    1
    Rep Power
    11
    Hello everyone I am trying to make myself a ranked staff member on there and to do so I had to change it under a .java file so I need to compile/build the file but I am getting this error
    Code:
    Compiling...
    src\org\arios\game\system\mysql\SQLConnectionPool.java:8: error: package com.jol
    box.bonecp does not exist
    import com.jolbox.bonecp.BoneCP;
                            ^
    src\org\arios\game\system\mysql\SQLConnectionPool.java:9: error: package com.jol
    box.bonecp does not exist
    import com.jolbox.bonecp.BoneCPConfig;
                            ^
    src\org\arios\game\system\mysql\SQLConnectionPool.java:36: error: cannot find sy
    mbol
            private static BoneCP pool;
                           ^
      symbol:   class BoneCP
      location: class SQLConnectionPool
    src\org\arios\game\world\map\build\DynamicRegion.java:249: error: '.' expected
                    Region.load(DynamicRegion.super);
                                                   ^
    src\org\arios\game\world\map\build\DynamicRegion.java:249: error: ')' expected
                    Region.load(DynamicRegion.super);
                                                    ^
    src\org\arios\game\world\map\build\DynamicRegion.java:249: error: ';' expected
                    Region.load(DynamicRegion.super);
                                                     ^
    src\org\arios\game\system\mysql\SQLConnectionPool.java:46: error: cannot find sy
    mbol
                            BoneCPConfig config = new BoneCPConfig();
                            ^
      symbol:   class BoneCPConfig
      location: class SQLConnectionPool
    src\org\arios\game\system\mysql\SQLConnectionPool.java:46: error: cannot find sy
    mbol
                            BoneCPConfig config = new BoneCPConfig();
                                                      ^
      symbol:   class BoneCPConfig
      location: class SQLConnectionPool
    src\org\arios\game\system\mysql\SQLConnectionPool.java:53: error: cannot find sy
    mbol
                            pool = new BoneCP(config);
                                       ^
      symbol:   class BoneCP
      location: class SQLConnectionPool
    src\org\arios\game\world\map\build\DynamicRegion.java:250: error: cannot find sy
    mbol
                    RegionPlane p = getPlanes()[z];
                                ^
      symbol:   variable p
      location: class DynamicRegion
    src\org\arios\game\world\map\build\DynamicRegion.java:252: error: cannot find sy
    mbol
                    p.getChunks()[x][y] = chunk;
                    ^
      symbol:   variable p
      location: class DynamicRegion
    src\org\arios\game\world\map\build\DynamicRegion.java:256: error: cannot find sy
    mbol
                                            p.getFlags().getClippingFlags()[i][j] =
    -1;
                                            ^
      symbol:   variable p
      location: class DynamicRegion
    src\org\arios\game\world\map\build\DynamicRegion.java:257: error: cannot find sy
    mbol
                                            p.getProjectileFlags().getClippingFlags(
    )[i][j] = -1;
                                            ^
      symbol:   variable p
      location: class DynamicRegion
    src\org\arios\game\world\map\build\DynamicRegion.java:258: error: cannot find sy
    mbol
                                            GameObject object = p.getObjects()[i][j]
    ;
                                                                ^
      symbol:   variable p
      location: class DynamicRegion
    src\org\arios\game\world\map\build\DynamicRegion.java:262: error: cannot find sy
    mbol
                                                    p.add(null, i, j, true);
                                                    ^
      symbol:   variable p
      location: class DynamicRegion
    src\org\arios\game\world\map\build\DynamicRegion.java:278: error: cannot find sy
    mbol
                                            p.getFlags().getLandscape()[toX][toY] =
    rp.getFlags().getLandscape()[fromX][fromY];
                                            ^
      symbol:   variable p
      location: class DynamicRegion
    src\org\arios\game\world\map\build\DynamicRegion.java:279: error: cannot find sy
    mbol
                                            p.getFlags().getClippingFlags()[toX][toY
    ] = rp.getFlags().getClippingFlags()[fromX][fromY];
                                            ^
      symbol:   variable p
      location: class DynamicRegion
    src\org\arios\game\world\map\build\DynamicRegion.java:280: error: cannot find sy
    mbol
                                            p.getProjectileFlags().getClippingFlags(
    )[toX][toY] = rp.getProjectileFlags().getClippingFlags()[fromX][fromY];
                                            ^
      symbol:   variable p
      location: class DynamicRegion
    src\org\arios\game\world\map\build\DynamicRegion.java:286: error: cannot find sy
    mbol
                                                    p.add(null, toX, toY, true);
                                                    ^
      symbol:   variable p
      location: class DynamicRegion
    19 errors
    Press any key to continue . . .
    I see the MySQL but I don't know what to really do there I have Xampp so if anyone can help me with that I wouldn't mind (: also if anyone can help me with the other errors that would be great also since there is 19 of them
    Thanks everyone from Rune-Server for all the help in the past and hopefully not many more in the future (hence I become better with java programs)
    Reply With Quote  
     

  2. #2  
    Server Developer
    Argyros's Avatar
    Join Date
    Apr 2011
    Posts
    498
    Thanks given
    25
    Thanks received
    31
    Rep Power
    23
    You are missing the libraries/imports or not compiling it right.
    Use Eclipse to compile the server.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Dec 2013
    Age
    30
    Posts
    19
    Thanks given
    5
    Thanks received
    1
    Rep Power
    11
    Oh okay, I am using Eclipse now but I am getting this error now,
    Code:
    Description	Resource	Path	Location	Type
    Duplicate methods named spliterator with the parameters () and () are inherited from the types Collection<E> and Iterable<E>	NodeList.java	/GrimmScape Source/src/org/arios/game/world/repository	line 15	Java Problem
    Here is the NodeList.java will mark the error in red and underline it,
    Code:
    package org.arios.game.world.repository;
    
    import java.util.Arrays;
    import java.util.Collection;
    import java.util.Iterator;
    
    import org.arios.game.node.Node;
    
    /**
     * A class which represents a list of nodes.
     * @author Graham Edgecombe
     * @author Emperor
     * @param <E> The type of Node.
     */
    public class NodeList<E extends Node> implements Collection<E>, Iterable<E> {
    	
    	/**
    	 * Internal nodes array.
    	 */
    	private Node[] nodes;
    	
    	/**
    	 * Current size.
    	 */
    	private int size = 0;
    	
    	/**
    	 * Creates a Node list with the specified capacity.
    	 * @param capacity The capacity.
    	 */
    	public NodeList(int capacity) {
    		nodes = new Node[capacity + 1]; // do not use idx 0
    	}
    	
    	/**
    	 * Gets an Node.
    	 * @param index The index.
    	 * @return The Node.
    	 * @throws IndexOutOufBoundException if the index is out of bounds.
    	 */
    	@SuppressWarnings("unchecked")
    	public E get(int index) {
    		synchronized (this) {
    			if (index <= 0 || index >= nodes.length) {
    				throw new IndexOutOfBoundsException();
    			}
    			return (E) nodes[index];
    		}
    	}
    	
    	/**
    	 * Gets the index of an Node.
    	 * @param Node The Node.
    	 * @return The index in the list.
    	 */
    	public int indexOf(Node node) {
    		return node.getIndex();
    	}
    	
    	/**
    	 * Gets the next free id.
    	 * @return The next free id.
    	 */
    	private int getNextId() {
    		for (int i = 1; i < nodes.length; i++) {
    			if (nodes[i] == null) {
    				return i;
    			}
    		}
    		return -1;
    	}
    
    	@Override
    	public boolean add(E arg0) {
    		synchronized (this) {
    			int id = getNextId();
    			if (id == -1) {
    				return false;
    			}
    			nodes[id] = arg0;
    			arg0.setIndex(id);
    			size++;
    			return true;
    		}
    	}
    
    	@Override
    	public boolean addAll(Collection<? extends E> arg0) {
    		synchronized (this) {
    			boolean changed = false;
    			for (E node : arg0) {
    				if (add(node)) {
    					changed = true;
    				}
    			}
    			return changed;
    		}
    	}
    
    	@Override
    	public void clear() {
    		synchronized (this) {
    			for (int i = 1; i < nodes.length; i++) {
    				nodes[i] = null;
    			}
    			size = 0;
    		}
    	}
    
    	@Override
    	public boolean contains(Object arg0) {
    		synchronized (this) {
    			for (int i = 1; i < nodes.length; i++) {
    				if (nodes[i] == arg0) {
    					return true;
    				}
    			}
    		}
    		return false;
    	}
    
    	@Override
    	public boolean containsAll(Collection<?> arg0) {
    		boolean failed = false;
    		for (Object o : arg0) {
    			if (!contains(o)) {
    				failed = true;
    			}
    		}
    		return !failed;
    	}
    
    	@Override
    	public boolean isEmpty() {
    		return size() == 0;
    	}
    
    	@Override
    	public Iterator<E> iterator() {
    		return new NodeListIterator<E>(this);
    	}
    	
    	/**
    	 * Removes the node on this index.
    	 * @param index The index.
    	 * @return {@code True} if a node got removed.
    	 */
    	public boolean remove(int index) {
    		synchronized (this) {
    			Node n = nodes[index];
    			if (n != null) {
    				size--;
    				nodes[index] = null;
    			}
    			return n != null;
    		}
    	}
    
    	@Override
    	public boolean remove(Object arg0) {
    		synchronized (this) {
    			for (int i = 1; i < nodes.length; i++) {
    				if (nodes[i] == arg0) {
    					nodes[i] = null;
    					size--;
    					return true;
    				}
    			}
    			return false;
    		}
    	}
    
    	@Override
    	public boolean removeAll(Collection<?> arg0) {
    		synchronized (this) {
    			boolean changed = false;
    			for (Object o : arg0) {
    				if (remove(o)) {
    					changed = true;
    				}
    			}
    			return changed;
    		}
    	}
    
    	@Override
    	public boolean retainAll(Collection<?> arg0) {
    		synchronized (this) {
    			boolean changed = false;
    			for (int i = 1; i < nodes.length; i++) {
    				if (nodes[i] != null) {
    					if (!arg0.contains(nodes[i])) {
    						nodes[i] = null;
    						size--;
    						changed = true;
    					}
    				}
    			}
    			return changed;
    		}
    	}
    
    	@Override
    	public int size() {
    		return size;
    	}
    
    	@Override
    	public Node[] toArray() {
    		synchronized (this) {
    			int size = size();
    			Node[] array = new Node[size];
    			int ptr = 0;
    			for (int i = 1; i < nodes.length; i++) {
    				if (nodes[i] != null) {
    					array[ptr++] = nodes[i];
    				}
    			}
    			return array;
    		}
    	}
    
    	@SuppressWarnings("unchecked")
    	@Override
    	public <T> T[] toArray(T[] arg0) {
    		Node[] arr = toArray();
    		return (T[]) Arrays.copyOf(arr, arr.length, arg0.getClass());
    	}
    
    }
    I tried the Eclipse quick fix but what it wants me to do is change the NodeList error name which I did but I end up with more errors? If anyone or you Argyros could help me understand what I need to do to fix it that would be great, thanks everyone (:
    Last edited by kyleeck1; 12-21-2014 at 06:46 PM. Reason: Fixed the color
    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. Java Help + Compiler Errors + highscores help
    By Silenced in forum Requests
    Replies: 6
    Last Post: 10-16-2008, 03:38 PM
  2. Basic Compile Errors
    By Daniel in forum Tutorials
    Replies: 4
    Last Post: 09-17-2007, 12:54 PM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •