diff --git a/scripting/player_prefs.sma b/scripting/player_prefs.sma index e497013..c05c7c4 100644 --- a/scripting/player_prefs.sma +++ b/scripting/player_prefs.sma @@ -50,6 +50,10 @@ new bool: g_bDebugMode; public plugin_init() { register_plugin("Player preferences", "1.2.0", "ufame"); + if (g_tKeys == Invalid_Trie) { + g_tKeys = TrieCreate(); + } + CreateForwards(); ReadDbCredentials(); @@ -166,9 +170,6 @@ public bool: native_set_key_default_value(iPlugin, iArgs) { SQL_ThreadQuery(g_hSqlTuple, "ThreadQuery_Handler", g_szQuery, iData, sizeof iData); } - if (g_tKeys == Invalid_Trie) - g_tKeys = TrieCreate(); - return bool: TrieSetString(g_tKeys, szKey, szDefaultValue); }