Thread: Compiler Errors [Devo 2.7]

Results 1 to 3 of 3
  1. #1 Compiler Errors [Devo 2.7] 
    Registered Member Dezzan's Avatar
    Join Date
    Oct 2009
    Age
    30
    Posts
    409
    Thanks given
    2
    Thanks received
    6
    Rep Power
    30
    Quote Originally Posted by Sabre Rush View Post
    Well.. I'll post pictures of my problem:

    This is where I spawn an object:




    It shows up where I spawned it, but then It pops up multiple times around the world. :




    Heres the createobject code:

    Code:
    	public void CreateObj(int x, int y, int id, int face, int type)
    	{
    		outStream.createFrame(85);
    		outStream.writeByteC(y - (mapRegionY * 8));
    		outStream.writeByteC(x - (mapRegionX * 8));
    		outStream.createFrame(151);
    		outStream.writeByteA(0);
    		outStream.writeWordBigEndian(id);
    		outStream.writeByteS((type << 2) + (face & 3));
    	}
    And heres an example of a server that has an unglitched CreateObject method:

    Code:
    	public void createObject(int x, int y, int typeID, int orientation, int tileObjectType){ //Makes Global objects
    		for (Player p : GameEngine.playerHandler.players) {
    			if (p != null) {
    				clientHandler person = (clientHandler)p;
    
    				if ((person.playerName != null || person.playerName != "null")) {
    					if (person.distanceToPoint(x, y) <= 60) {
    						person.createNewTileObject(x, y, typeID, orientation, tileObjectType);
    					}
    				}
    			}
    		}
    	}


    Any help on getting this to work on my server would be great.. I'm just inexperienced and don't know where to start.


    That was my old help thread..

    Now, after I swapped the code around, I get these errors:


    Code:
    .\server\players\client.java:10594: package GameEngine does not exist
                    for (Player p : GameEngine.playerHandler.players) {
                                              ^
    .\server\players\client.java:10596: cannot find symbol
    symbol  : class clientHandler
    location: class server.players.client
                                    clientHandler person = (clientHandler)p;
                                    ^
    .\server\players\client.java:10596: cannot find symbol
    symbol  : class clientHandler
    location: class server.players.client
                                    clientHandler person = (clientHandler)p;
                                                            ^
    Note: .\server\server.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    3 errors
    Press any key to continue . . .

    Basically its just missing methods.

    Anyone whos familiar with Devo 2.7 want to help me out?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Hunter's Avatar
    Join Date
    Jun 2009
    Age
    33
    Posts
    857
    Thanks given
    3
    Thanks received
    23
    Rep Power
    216
    I'm not familiar with it at all, but I reccommend doing the following:

    1.) Change clientHandler to client.
    2.) Find where your playerHandler file is and change that last line accordingly.
    Reply With Quote  
     

  3. #3  
    Registered Member Dezzan's Avatar
    Join Date
    Oct 2009
    Age
    30
    Posts
    409
    Thanks given
    2
    Thanks received
    6
    Rep Power
    30
    Quote Originally Posted by Hunter View Post
    I'm not familiar with it at all, but I reccommend doing the following:

    1.) Change clientHandler to client.
    2.) Find where your playerHandler file is and change that last line accordingly.
    Thanks! That was just about it.. Not exactly but you helped me a lot in fixing it.

    Thx repped.
    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

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