Thread: PI Private message logs help

Results 1 to 8 of 8
  1. #1 PI Private message logs help 
    Extreme Donator

    Join Date
    Oct 2011
    Posts
    234
    Thanks given
    3
    Thanks received
    14
    Rep Power
    37
    This is basically what is looks like and i cannot figure out how to remove the spaces... Thanks in advance for any help!

    The message i sent was "test" but the message logged is "t e s t" everything the play sends is logged with spaces..

    [PRIVATE CHAT LOG] Coords: [X: 3094 Y: 3497 H: 0] - Rights: [3] Username: [Username] - t e s t


    Code:
    	public void writePMLog(String data)
    	{
    		//checkDateAndTime();	
    		String filePath = "./Logs/Chat/Private/" + c.playerName + ".txt";
    		BufferedWriter bw = null;
    		
    		try 
    		{				
    			bw = new BufferedWriter(new FileWriter(filePath, true));
    			bw.write("[PRIVATE CHAT LOG] Coords: [X: "+c.absX+" Y: "+c.absY+" H: "+c.heightLevel+"] -" + " Rights: [" + c.playerRights + "]" + " Username: [" + c.playerName +"] - " + "" + data + " ");
    			bw.newLine();
    			bw.flush();
    		} 
    		catch (IOException ioe) 
    		{
    			ioe.printStackTrace();
    		} 
    		finally 
    		{
    			if (bw != null)
    			{
    				try 
    				{
    					bw.close();
    				} 
    				catch (IOException ioe2) 
    				{
    				}
    			}
    		}
    	}
    
    		c.getPA().writePMLog(Misc.textUnpack(pmchatText, packetSize-8));
    Quote Originally Posted by Poseidon
    vouch for dragon trade went smooth
    Quote Originally Posted by Sillhouette
    Vouch for callmedragon, we went half and half on a service trade and he followed through
    Reply With Quote  
     

  2. #2  
    Registered Member Intellectual's Avatar
    Join Date
    Apr 2014
    Posts
    59
    Thanks given
    6
    Thanks received
    5
    Rep Power
    11
    You're not wanting the username spaces as it reads t e s t?
    Reply With Quote  
     

  3. #3  
    Extreme Donator

    Join Date
    Oct 2011
    Posts
    234
    Thanks given
    3
    Thanks received
    14
    Rep Power
    37
    Quote Originally Posted by Murder View Post
    You're not wanting the username spaces as it reads t e s t?
    Clarified more sorry about that
    Quote Originally Posted by Poseidon
    vouch for dragon trade went smooth
    Quote Originally Posted by Sillhouette
    Vouch for callmedragon, we went half and half on a service trade and he followed through
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Apr 2011
    Age
    28
    Posts
    7
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    I have the exact same problem, any help would be appreciated
    Reply With Quote  
     

  5. #5  
    Registered Member
    Alpi's Avatar
    Join Date
    Jun 2011
    Age
    28
    Posts
    1,191
    Thanks given
    212
    Thanks received
    285
    Rep Power
    148
    Code:
    string.replaceAll(" ", "");
    would be your solution
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Apr 2011
    Age
    28
    Posts
    7
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by RiiPiiNFtW View Post
    Code:
    string.replaceAll(" ", "");
    would be your solution
    Thanks, fixed partly
    Reply With Quote  
     

  7. #7  
    Extreme Donator

    Join Date
    Oct 2011
    Posts
    234
    Thanks given
    3
    Thanks received
    14
    Rep Power
    37
    Quote Originally Posted by RiiPiiNFtW View Post
    Code:
    string.replaceAll(" ", "");
    would be your solution
    Your solution partially fixed the issue but here is what happens now. Thanks for help!
    Code:
    "test"
    
    [PRIVATE CHAT LOG] Coords: [X: 3016 Y: 3356 H: 0] - Rights: [3] Username: [Default] - test 
    
    "test'"
    
    [PRIVATE CHAT LOG] Coords: [X: 3016 Y: 3356 H: 0] - Rights: [3] Username: [Default] - testat
    Quote Originally Posted by Poseidon
    vouch for dragon trade went smooth
    Quote Originally Posted by Sillhouette
    Vouch for callmedragon, we went half and half on a service trade and he followed through
    Reply With Quote  
     

  8. #8  
    Registered Member
    Alpi's Avatar
    Join Date
    Jun 2011
    Age
    28
    Posts
    1,191
    Thanks given
    212
    Thanks received
    285
    Rep Power
    148
    add a regex check

    Java Regex - Tutorial might help you
    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. [HELP] [REP++] [PI] Private messaging issue
    By xx k03d xx in forum Help
    Replies: 6
    Last Post: 02-11-2013, 02:42 AM
  2. PI Private messaging logs
    By callmedragon in forum Help
    Replies: 2
    Last Post: 12-08-2012, 06:37 PM
  3. [317] PI Private Message Help
    By BuhRock in forum Help
    Replies: 3
    Last Post: 07-27-2012, 08:25 PM
  4. [PI] Private Messaging
    By Smakt in forum Help
    Replies: 5
    Last Post: 12-16-2010, 10:03 PM
  5. [PI] Private Messaging
    By Harambe_ in forum Help
    Replies: 2
    Last Post: 09-04-2010, 02:36 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
  •