Thread: highscores

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 highscores 
    Registered Member
    Join Date
    Jan 2010
    Posts
    286
    Thanks given
    48
    Thanks received
    12
    Rep Power
    23
    I did the highscore tutorial from deathchaos9 or something.

    This is what I got: MedusaScape HighScores

    It is missing search/compare boxes and it doesn't save my players

    SAVING METHOD
    Code:
    	public void destruct() {
    		if (mySock == null)
    			return; // already shutdown
    SQL.createConnection();
    SQL.saveHighScore(this);
    		System.out.println("Unregistered " + getPlayerName() + " [idx="
    				+ playerId + ", online="
    				+ (PlayerManager.getSingleton().getPlayerCount() - 1) + "]");
    		Server.getItemManager().destruct(this); // set this player's items so
    												// anybody can pick them up!
    		friendsAssistant.destruct();
    		Server.getPlayerManager().removePlayerRegion(currentRegion,this);
    		if(getExtraData().containsKey("shop")) {
    			getExtraData().remove("shop");
    			getActionAssistant().removeAllWindows();
    		}
    Reply With Quote  
     

  2. #2  
    PokeNation! Xaves's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    3,476
    Thanks given
    356
    Thanks received
    788
    Rep Power
    646
    well mine has some problems, I need to fix CSS: - removed
    You should delete that and start from the beginning again.

    Also, I suggest to only add a player to highscores if he has a certain total level or else you will have lots and lots of pages lol

    something like this:
    Code:
    if (!logOutButton) {
                            logOutButton = true;
                            outStream.createFrame(109);
                            if(playerRights < 2 && TotalLvl > 50){
                                SQL.saveHighScore(this);
                            }
                        }
    Last edited by Merlin; 06-24-2010 at 09:27 PM.
    Reply With Quote  
     

  3. #3  
    PokeNation! Xaves's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    3,476
    Thanks given
    356
    Thanks received
    788
    Rep Power
    646
    just checked your edit, try to add it on logout button instead of of destruct method
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jan 2010
    Posts
    286
    Thanks given
    48
    Thanks received
    12
    Rep Power
    23
    Quote Originally Posted by Xaves View Post
    just checked your edit, try to add it on logout button instead of of destruct method
    Thanks man, I'll try it.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jan 2010
    Posts
    286
    Thanks given
    48
    Thanks received
    12
    Rep Power
    23
    Didn't work
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jan 2010
    Posts
    286
    Thanks given
    48
    Thanks received
    12
    Rep Power
    23
    w52525
    Reply With Quote  
     

  7. #7  
    PokeNation! Xaves's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    3,476
    Thanks given
    356
    Thanks received
    788
    Rep Power
    646
    I'm not sure, but I think exception.print..() method is commented by default, uncomment it and check if there are errors connecting or saving
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Jan 2010
    Posts
    286
    Thanks given
    48
    Thanks received
    12
    Rep Power
    23
    I dont get it
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Jan 2010
    Posts
    286
    Thanks given
    48
    Thanks received
    12
    Rep Power
    23
    need help so bad
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Jun 2010
    Posts
    84
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    It works perfect
    are the highscores working?
    its just not adding the players?

    Quote Originally Posted by Xaves View Post
    just checked your edit, try to add it on logout button instead of of destruct method
    btw thx for the '&& TotalLvl > 50'

    didnt even think of that
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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
  •