Raised This Month: $7 Target: $400
 1% 

Icons Color Changer v1.1


Post New Thread Reply   
 
Thread Tools Display Modes
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-29-2009 , 11:05   Re: Icons Color Changer
Reply With Quote #21

What is the advantage on using a trie rather than a global array and the do a for loop and check strings, send only 1 TrieGetCell() vs. send multiple equal() ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 04-29-2009 , 11:10   Re: Icons Color Changer
Reply With Quote #22

TrieGetCell is cleaner. If you want to add a cvar, without tries, you would have to add one elseif and one equal in the middle of your code. In the worst case (where the string is not in the list), you have "size of the list" calls to the native "equal".

In this particular case, the efficiency should be almost the same. If the string list was big, tries would be a mandatory choice.
__________________
joaquimandrade is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-29-2009 , 11:13   Re: Icons Color Changer
Reply With Quote #23

Quote:
Originally Posted by joaquimandrade View Post
you would have to add one elseif and one equal in the middle of your code
I don't think so.

Ok for the rest of the answer ;)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 04-29-2009 , 11:15   Re: Icons Color Changer
Reply With Quote #24

Quote:
Originally Posted by ConnorMcLeod View Post
I don't think so.

Ok for the rest of the answer ;)
Ah ok. You are right. (You mean iterating over the list).
__________________
joaquimandrade is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-29-2009 , 11:43   Re: Icons Color Changer
Reply With Quote #25

Trie,

Arkshine is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 04-29-2009 , 11:43   Re: Icons Color Changer
Reply With Quote #26

lol
__________________
joaquimandrade is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 04-29-2009 , 20:16   Re: Icons Color Changer
Reply With Quote #27

xPaw you are the best haha !

Good Job
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
beckham9224
Senior Member
Join Date: Feb 2009
Location: Asia, Mongolia
Old 04-30-2009 , 23:04   Re: Icons Color Changer
Reply With Quote #28

hey i added that plugin and i cant see any changes? What shud i need to do?
beckham9224 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 05-01-2009 , 02:04   Re: Icons Color Changer
Reply With Quote #29

o_O just add it and restart server, recheck the amxx list
__________________
xPaw is offline
beckham9224
Senior Member
Join Date: Feb 2009
Location: Asia, Mongolia
Old 05-01-2009 , 02:15   Re: Icons Color Changer
Reply With Quote #30

oh -.-
wrote it like this "iconcolorchanger.amxx"
it is the real name "iconscolorchanger.amxx"
tnx m8
beckham9224 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode