Raised This Month: $ Target: $400
 0% 

Building an array of tries


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 07-17-2011 , 01:26   Building an array of tries
Reply With Quote #1

I wanted to try and make some sort of arrays of tries with indexes based off of the plugin id's. Each index would then be a Trie table storing the function names. I wanted to try and create a way to track certain functions within certain plugins, but I can't use the function ids because they aren't unique, and function names can be the same in different plugins. I was wondering if anyone had any different ideas on how to approach this. Since the array would have to be the size of get_pluginsnum(), it would have to be instantiated at runtime, but the plugins that aren't used would just be left uninitialized until they are initialized (if they need to be used).

From the top of my head, it would look something like this...

Code:
new Array:myArray;

public plugin_init() {
    myArray = ArrayCreate(1);
    for (new i; i < get_pluginsnum(); i++) {
         new Trie:myTrie = TrieCreate();
         ArrayPushCell(myArray, i, myTrie);
    }
}
I haven't actually tried it yet, but that's just what is in my head.
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]

Last edited by Tirant; 07-17-2011 at 01:39.
Tirant is offline
 



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 01:09.


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