TrieCreate -- what is it? How to use it.
Hi All ,
I saw in one of ConnorMcLeod's plugin he is using TrieCreate. Can somebody tell me what is it and how to use it :oops:? I am just learning. So don't scold me.:oops: |
Re: TrieCreate -- what is it? How to use it.
It allows you to associate a key to something (integer, string or array), so a keytable.
And it's unlimited. // Creating a trie new handle = TrieCreate() // Inserting a new key TrieSetCell( handle, "gamer99", 1337 ); TrieSetCell( handle, "blabla", 123 ); ... // Checking if a key exists in the table new bool:result = TrieKeyExists( handle, "gamer99" ); // Checking existing key/Retrieving its associated value new value; new bool:result = TrieGetCell( handle, "gamer99", value ); You get the idea. To get more examples, simply look at the plugins. Many plugins use Trie. (Some default plugin too If I remember) |
Re: TrieCreate -- what is it? How to use it.
It can assign an unlimited amount of arrays/strings to values.
PHP Code:
|
Re: TrieCreate -- what is it? How to use it.
Thank you for your nice explanation.
I got the idea :). |
Re: TrieCreate -- what is it? How to use it.
As far as Exolent told me, Tries allows you to index arrays with strings instead of numbers
Heres a brief concept map: Code:
|
Re: TrieCreate -- what is it? How to use it.
Quote:
|
| All times are GMT -4. The time now is 19:33. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.