i am trying to use a Trie for my first time and this what i did :
PHP Code:
#include <amxmodx>
#define MAX_BANNED_PLAYERS 32
new Trie:blocked_id
public plugin_init()
{
blocked_id = TrieCreate()
new file, banned_player[MAX_BANNED_PLAYERS], key[128]
file = fopen("addons/amxmodx/configs/banned.ini", "rt")
while (!feof(file))
{
fgets(file, banned_player, charsmax(banned_player))
TrieSetString(blocked_id, key, banned_player)
}
fclose(file)
if(TrieKeyExists(blocked_id, "123"))
{
fputs(file, "this line exists")
}
}
but its not working ( BTW blocked_id isn't really player id's it was the idea but didn't work.)