AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   May I store both int and string in the same Trie? (https://forums.alliedmods.net/showthread.php?t=172268)

hzqst 11-18-2011 06:16

May I store both int and string in the same Trie?
 
just like:
PHP Code:

                new Key[2]
                
Key[0] = 123
                TrieSetString
(store[0], Key"goodman");
                
Key[0] = 1
                TrieSetCell
(store[0], Key12345); 


Arkshine 11-18-2011 07:57

Re: May I store both int and string in the same Trie?
 
You can (though the key should be a string not an array), but why don't you test yourself ? It takes 30 seconds. Learn to test yourself before asking here.

hzqst 11-18-2011 08:30

Re: May I store both int and string in the same Trie?
 
Quote:

Originally Posted by Arkshine (Post 1598520)
You can (though the key should be a string not an array), but why don't you test yourself ? It takes 30 seconds. Learn to test yourself before asking here.

Tested, it works with the code above
But later , when I try to store more, they just can not be read regularly


All times are GMT -4. The time now is 08:24.

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