| 
		
			| Re: weird reaction with const w_chart [message #464182 is a reply to message #464170] | Sat, 10 March 2012 18:28   |  
			| 
				
				|  |  Ethenal Messages: 2532
 Registered: January 2007
 Location: US of A
 
	Karma: 
 | General (2 Stars) |  
 |  |  
	| | iRANian wrote on Sat, 10 March 2012 18:05 |  | If you're gonna be building a bot that responds to commands, it's a nice idea to store them in a hash table, with as key the text that triggers the command and the value being a pointer to a class that inherits a generic chat command class, so you can call a function from a class when it is found in the hash table, which is done almost instantaneously, instead of having to go over a list of all triggers to trigger a specific function, which is very slow and makes the code to check what command to trigger very long-winded code.
 
 | 
 Isn't that essentially the same thing? Even if you're using a hash table, does it not internally have to go down the list of values until it finds the one with the name you want?
 
 
 | -TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29 |  | Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade
   
 | 
 
 |  
	|  |  |