Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » weird reaction with const w_chart
Re: weird reaction with const w_chart [message #464182 is a reply to message #464170] Sat, 10 March 2012 18:28 Go to previous messageGo to previous message
Ethenal is currently offline  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 Thumbs Up

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: need some help whit hud text
Next Topic: C&C_Nodewar :: WIP
Goto Forum:
  


Current Time: Thu Dec 19 15:34:33 MST 2024

Total time taken to generate the page: 0.00945 seconds