| Author | 
		Message | 
	
	
		BDwinsAlt Agurus's Posse
  
  Age:35  Gender:  Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
  | 
		
			
			  
			    
				
					 Posted: Mon Aug 29, 2005 10:33 am     Post subject: ArrayList.size() sends multiple times...(help) | 
					  | 
					      | 
				 
			     
			   | 
			 
			
				
  | 
			 
			
				OK i have this !error command that reports errors for my bot. I want to be able to show Total Errors at the bottom this is what happends:
 
 
BDwinsAlt> !errorlist
 
ST 2.3> 08/28/2005 - BDwinsAlt : test
 
Total Errors: 1
 
 
now watch
 
 
BDwinsAlt> !errorlist
 
ST 2.3> 08/28/2005 - BDwinsAlt : test
 
ST 2.3> 08/28/2005 - BDwinsAlt : test2
 
Total Errors: 2
 
Total Errors: 2
 
 
If it has two errors, it sends total errors twice.
 
How do i stop this? My code is:
 
 
for (int i = 0; i < log.size(); i++) {
 
    m_botAction.sendPrivateMessage( name, "Total Errors: " + log.size() );
 
} | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Maverick
 
  
  Age:41  Gender:  Joined: Feb 26 2005 Posts: 1521 Location: The Netherlands Offline
  | 
		
			
			  
			    
				
					 Posted: Mon Aug 29, 2005 10:36 am     Post subject:  | 
					  | 
					      | 
				 
			     
			   | 
			 
			
				
  | 
			 
			
				Just move the 'sendPrivateMessage()' outside the for() loop or remove the for() loop alltogether. _________________
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Bak ?ls -s 0 in
  
  Age:26  Gender:  Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
  | 
		 | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		BDwinsAlt Agurus's Posse
  
  Age:35  Gender:  Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
  | 
		
			
			  
			    
				
					 Posted: Mon Aug 29, 2005 2:53 pm     Post subject:  | 
					  | 
					      | 
				 
			     
			   | 
			 
			
				
  | 
			 
			
				| Alright ill try it. Thanks. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		BDwinsAlt Agurus's Posse
  
  Age:35  Gender:  Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
  | 
		
			
			  
			    
				
					 Posted: Mon Aug 29, 2005 3:05 pm     Post subject:  | 
					  | 
					      | 
				 
			     
			   | 
			 
			
				
  | 
			 
			
				It worked. Thanks guys. I had it reading from a text file ahaha so it posted it twice anyways.    I removed the Buffered Reader and now its just an actual log. $$ Thanks guys. You Rock!    | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Cyan~Fire I'll count you!
  
 
  Age:37  Gender:  Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
  | 
		
			
			  
			    
				
					 Posted: Mon Aug 29, 2005 4:43 pm     Post subject:  | 
					  | 
					      | 
				 
			     
			   | 
			 
			
				
  | 
			 
			
				Ah hah! So Java can't fix all programmer's errors by itself! _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
 
Wise men STILL seek Him. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		BDwinsAlt Agurus's Posse
  
  Age:35  Gender:  Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
  | 
		
			
			  
			    
				
					 Posted: Mon Aug 29, 2005 6:00 pm     Post subject:  | 
					  | 
					      | 
				 
			     
			   | 
			 
			
				
  | 
			 
			
				It's free, and so advanced    What do you expect? | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		D1st0rt Miss Directed Wannabe
  
  Age:37  Gender:  Joined: Aug 31 2003 Posts: 2247 Location: Blacksburg, VA Offline
  | 
		
			
			  
			    
				
					 Posted: Mon Aug 29, 2005 6:31 pm     Post subject:  | 
					  | 
					      | 
				 
			     
			   | 
			 
			
				
  | 
			 
			
				I don't know of anything that actually fixes logical errors with any degree of success, cyan   _________________
  
 
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		BDwinsAlt Agurus's Posse
  
  Age:35  Gender:  Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
  | 
		
			
			  
			    
				
					 Posted: Mon Aug 29, 2005 6:36 pm     Post subject:  | 
					  | 
					      | 
				 
			     
			   | 
			 
			
				
  | 
			 
			
				   I love you. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		D1st0rt Miss Directed Wannabe
  
  Age:37  Gender:  Joined: Aug 31 2003 Posts: 2247 Location: Blacksburg, VA Offline
  | 
		
			
			  
			    
				
					 Posted: Mon Aug 29, 2005 6:38 pm     Post subject:  | 
					  | 
					      | 
				 
			     
			   | 
			 
			
				
  | 
			 
			
				(he's kidding of course)
 
 
Cyan, you should make a program that's actually just you going through correcting errors and writing the rest of the code. I would use that program like every day. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		BDwinsAlt Agurus's Posse
  
  Age:35  Gender:  Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
  | 
		
			
			  
			    
				
					 Posted: Mon Aug 29, 2005 6:44 pm     Post subject:  | 
					  | 
					      | 
				 
			     
			   | 
			 
			
				
  | 
			 
			
				I never said i was kidding    
 
lol just playing. But i really look up to you. Your cool in my eyes. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		D1st0rt Miss Directed Wannabe
  
  Age:37  Gender:  Joined: Aug 31 2003 Posts: 2247 Location: Blacksburg, VA Offline
  | 
		
			
			  
			    
				
					 Posted: Mon Aug 29, 2005 6:44 pm     Post subject:  | 
					  | 
					      | 
				 
			     
			   | 
			 
			
				
  | 
			 
			
				I meant cyan was kidding, and thank you   | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Cyan~Fire I'll count you!
  
 
  Age:37  Gender:  Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
  | 
		
			
			  
			    
				
					 Posted: Tue Aug 30, 2005 3:57 pm     Post subject:  | 
					  | 
					      | 
				 
			     
			   | 
			 
			
				
  | 
			 
			
				| Lol. What would it say if you used Java? "Get a real language, retard." | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		BDwinsAlt Agurus's Posse
  
  Age:35  Gender:  Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
  | 
		
			
			  
			    
				
					 Posted: Tue Aug 30, 2005 6:43 pm     Post subject:  | 
					  | 
					      | 
				 
			     
			   | 
			 
			
				
  | 
			 
			
				How is any of it real? Its all virtual anyways    | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		SamHughes Server Help Squatter
  
   Joined: Jun 30 2004 Posts: 251 Location: Greenwich Offline
  | 
		
			
			  
			    
				
					 Posted: Tue Aug 30, 2005 8:05 pm     Post subject:  | 
					  | 
					      | 
				 
			     
			   | 
			 
			
				
  | 
			 
			
				This reminds me of one of my more favorite quotes.
 
 
 	  | Charles Babbage wrote: | 	 		  | On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. | 	 
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		BDwinsAlt Agurus's Posse
  
  Age:35  Gender:  Joined: Jun 16 2003 Posts: 1145 Location: Alabama Offline
  | 
		
			
			  
			    
				
					 Posted: Tue Aug 30, 2005 8:55 pm     Post subject:  | 
					  | 
					      | 
				 
			     
			   | 
			 
			
				
  | 
			 
			
				I like marshmallows    | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		 |