Raised This Month: $ Target: $400
 0% 

[SOLVED] bit enum - trie cell


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 05-07-2014 , 19:51   [SOLVED] bit enum - trie cell
Reply With Quote #1

Is it possible to set enum value as trie cell?

Code:
enum _:Files ( <<=1 ) {     FILE = 1,     FILE1,     FILE2 } new const global_sFiles[ ][ ] = {     "file.mdl",     "file1.mdl",     "file2.mdl" } new global_iFlags[ 33 ]; new Trie:global_tFiles; public plugin_init( ) {     global_tFiles = TrieCreate( );         for( new i = 0; i < sizeof global_sFiles; i++ )         TrieSetCell( global_tFiles, global_sFiles[ i ], /* ENUM VALUE */ ); } public setFlag( id, sFile[ ] ) {     new iCell;     if( TrieGetCell( global_tFiles, sFile, iCell ) )     {         global_iFlags[ id ] |= iCell; /* I GET TAG MISMATCH IF I SET I + 1 AS CELL */     }   }

Last edited by OvidiuS; 05-08-2014 at 07:28.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
 



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


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