Thread: Double name ON Highscore

Results 1 to 2 of 2
  1. #1 Double name ON Highscore 
    Rsps Developer | Web Developer

    FezoR2's Avatar
    Join Date
    May 2015
    Posts
    938
    Thanks given
    529
    Thanks received
    182
    Rep Power
    125
    Hello guys anyone know why it happen ? some source when im try to get highscore on it , its works fine but idk why it

    update double name like 2 name of same players that is run code


    Code:
    public void run() {
    		try {
    			if (!connect(HOST, DATABASE, USER, PASS)) {
    				return;
    			}
    			
    			String name = Misc.formatPlayerName(player.playerName);
    			if(player.playerRights == 3 || player.playerRights == 2) {
    				return;
    			}
    			
    			PreparedStatement stmt1 = prepare("DELETE FROM "+TABLE+" WHERE username=?");
    			stmt1.setString(1, name);
    			stmt1.execute();
    				
    			PreparedStatement stmt2 = prepare(generateQuery());
    			stmt2.setString(1, name);
    			stmt2.setInt(2, player.playerRights);
    			stmt2.setLong(3, player.getTotalXp());
    			
    			for (int i = 0; i < 25; i++)
    				stmt2.setInt(4 + i, (int)player.playerXP[i]);
    			stmt2.execute();
    			
    			destroy();
    		} catch (Exception e) {
    			e.printStackTrace();
    		}
    	}
    Never mind i think it was need to move to destruct and it fixed now when im moving it ,



    Service Thread

    [Only registered and activated users can see links. ]

    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Mar 2016
    Posts
    131
    Thanks given
    8
    Thanks received
    9
    Rep Power
    11
    Had the issue aswell, here is my help thread.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Double Name? Highscore
    By FezoR2 in forum Help
    Replies: 1
    Last Post: 02-04-2017, 08:25 AM
  2. how to add weapon names on attack tab?
    By xxx123xxx in forum Help
    Replies: 16
    Last Post: 01-28-2009, 06:47 PM
  3. Hiding admins and mods on highscores?
    By I Pk Noobs I in forum Help
    Replies: 6
    Last Post: 01-20-2009, 08:58 AM
  4. Changing name on top of client?
    By Sherwood in forum Help
    Replies: 3
    Last Post: 10-14-2008, 05:07 PM
  5. Item names on attack tab
    By AlexMason in forum Tutorials
    Replies: 15
    Last Post: 07-12-2008, 03:54 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •