Thread: [PI] Compiling Error

Results 1 to 8 of 8
  1. #1 [PI] Compiling Error 
    Registered Member DAYUM's Avatar
    Join Date
    Jan 2011
    Posts
    216
    Thanks given
    39
    Thanks received
    0
    Rep Power
    1
    Hello.

    I was following this: http://www.rune-server.org/runescape...-no-mysql.html tutorial, and everything seemed to work just fine up until I added this code:
    Spoiler for code:
    Code:
    	public static boolean forceWebUpdate = false;
    
    	public static Thread WebCommThread = new Thread (
    		new Runnable(){
    			long lastUpdate = 0;
    			@Override
    			public void run(){
    				while(true){
    					try{
    						if(System.currentTimeMillis() - lastUpdate > 1000 * 60 * 5 || Server.forceWebUpdate){
    							lastUpdate = System.currentTimeMillis();
    							new URL("http://-/vps/reset.php?pass=jilixpie").openStream().close();
    							for(Player p1: PlayerHandler.players){
    								if(p1 != null){
    								    Client p = (Client)p1;
    									if(!p.properLogout)
    									new URL("http:/-/vps/add.php?pass=jilixpie&u=" + p.playerName.replaceAll(" ","%20")).openStream().close();
    								}
    							}
    							if(Server.forceWebUpdate)
    								Server.forceWebUpdate = false;
    						System.gc();
    						}
    					}catch(Exception e){}
    				}
    			}
    		}
    	);


    Here is the error I get when that code is added:
    Spoiler for code:
    Code:
    src\game\Server.java:61: error: cannot find symbol
                                                                            Client p
     = (Client)p1;
                                                                            ^
      symbol: class Client
    src\game\Server.java:61: error: cannot find symbol
                                                                            Client p
     = (Client)p1;
    
        ^
      symbol: class Client


    The reason why I get that error is because my source doesn't have a client class file. Strange, I know. But the Kritihum source uses player.java instead client.java for some reason..

    Since I didn't have a client.jave I figured I should just change the Client p = (Client)p1; to Player p = (Player)p1; since I'm using player.java. So, I compiled and I didn't get any errors, but then I ran the source and got this error.

    Spoiler for code:
    Code:
    [Aug 16, 2013 7:41:44 PM engine.event.TaskScheduler run
    SEVERE: Exception during task execution.
    java.lang.IllegalThreadStateException
            at java.lang.Thread.start(Unknown Source)
            at game.Server$2.execute(Server.java:193)
            at engine.event.Task.tick(Task.java:118)
            at engine.event.TaskScheduler.run(TaskScheduler.java:103)
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
            at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
    
            at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    access$301(Unknown Source)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
    run(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)


    So, does anyone have any suggestions on how I can add this feature to my server without client.java?
    Reply With Quote  
     

  2. #2  
    leme give u some n00ts

    noot noot's Avatar
    Join Date
    Dec 2012
    Posts
    1,186
    Thanks given
    191
    Thanks received
    132
    Rep Power
    409
    Simple, don't add the code. Thank me later.
    Attached image
    Spoiler for :

    [Today 05:42 AM] Thakiller: Danced to make us lauigh and put a smile on our faces
    Reply With Quote  
     

  3. #3  
    Registered Member DAYUM's Avatar
    Join Date
    Jan 2011
    Posts
    216
    Thanks given
    39
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by Skill_R_Us View Post
    Simple, don't add the code. Thank me later.
    You mean just the Client p = (Client)p1; part, right?

    I still get an error with that removed.

    Code:
    src\game\Server.java:62: error: cannot find symbol
                                                                            if(!p.pr
    operLogout)
                                                                                ^
      symbol: variable p
    src\game\Server.java:63: error: package p does not exist
                                                                            new URL(
    "http://-/vps/add.php?pass=jilixpie&u=" + p.playerName.replaceAll(
    " ","%20")).openStream().close();
    
                                                             ^
    2 errors
    Press any key to continue . . .
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Sep 2010
    Posts
    1,248
    Thanks given
    536
    Thanks received
    179
    Rep Power
    106
    Quote Originally Posted by Skill_R_Us View Post
    Simple, don't add the code. Thank me later.
    If your not going to help, why bother coming into this area.

    Import the client class, usually in the directory (folder) "Player", "Model" and etc. The format should be something like this:
    Import server.model.player.Client;
    Is this your client or server?
    Reply With Quote  
     

  5. #5  
    Registered Member DAYUM's Avatar
    Join Date
    Jan 2011
    Posts
    216
    Thanks given
    39
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by Kurdz View Post
    If your not going to help, why bother coming into this area.

    Import the client class, usually in the directory (folder) "Player", "Model" and etc. The format should be something like this:


    Is this your client or server?
    That's the thing though. My source doesn't have a client class. The source uses player.java instead, which doesn't make any sense to me. (I'm using the Krithium source in case you want to take a look)

    This is server sided.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Dec 2007
    Posts
    120
    Thanks given
    0
    Thanks received
    3
    Rep Power
    44
    Quote Originally Posted by DAYUM View Post
    That's the thing though. My source doesn't have a client class. The source uses player.java instead, which doesn't make any sense to me. (I'm using the Krithium source in case you want to take a look)

    This is server sided.
    do you have a link to the source? or teamviewer?
    Reply With Quote  
     

  7. #7  
    Registered Member DAYUM's Avatar
    Join Date
    Jan 2011
    Posts
    216
    Thanks given
    39
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by vinceishere View Post
    do you have a link to the source? or teamviewer?
    Yep, here's the link: http://www.rune-server.org/runescape...-krithium.html
    Reply With Quote  
     

  8. #8  
    Registered Member DAYUM's Avatar
    Join Date
    Jan 2011
    Posts
    216
    Thanks given
    39
    Thanks received
    0
    Rep Power
    1
    bump
    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: 13
    Last Post: 11-27-2010, 07:13 AM
  2. [PI] Compiling Error, Help.. REP!
    By Connor in forum Help
    Replies: 4
    Last Post: 11-13-2010, 04:10 PM
  3. [pi] compiling error
    By IcEbLiTzMeHh in forum Help
    Replies: 2
    Last Post: 11-06-2010, 03:22 PM
  4. [PI]Compile error pk point
    By cruelity in forum Help
    Replies: 13
    Last Post: 10-06-2010, 09:00 PM
  5. [Pi] Compiler error need help project insanity
    By Juggalo Family in forum Help
    Replies: 22
    Last Post: 08-16-2010, 12:40 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
  •