AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved Trie question (https://forums.alliedmods.net/showthread.php?t=293720)

Decak 02-08-2017 14:00

Trie question
 
Is there way to get every item in Trie hash map? For example:

Code:

new Trie:triename;
TrieSetCell(triename, "example1", 1)
TrieSetCell(triename, "example2", 2)
for(new i=0;i<TrieGetSize(triename);i++) {
 client_print(0, print_chat, triename_items[i]) //
}

Output would be:
1
2

Edit: I know that it is hash, but still, is there way?
Edit2: Solved with Trie Snapshots..

Natsheh 02-08-2017 14:22

Re: Trie question
 
New Trie:triename;
In plugin init forward

Set ( triename = CreateTrie( ) ) // that native will return a value for the variable if u didnt do this the variable is 0 which its not defineed


All times are GMT -4. The time now is 20:58.

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