Raised This Month: $ Target: $400
 0% 

Solved Trie question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Decak
Senior Member
Join Date: Sep 2012
Old 02-08-2017 , 14:00   Trie question
Reply With Quote #1

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..

Last edited by Decak; 02-08-2017 at 14:18.
Decak is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 02-08-2017 , 14:22   Re: Trie question
Reply With Quote #2

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

Last edited by Natsheh; 02-08-2017 at 14:23.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Reply



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 20:58.


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