I used to make custom db tuple using hardcoded credentials. I have moved all the data to configs/sql.cfg but when I try to create tuple using SQL_MakeStdTuple it gives me error saying it cannot connect to mysql socket. I found out that it is due to get_cvar_string returns empty string on any amx_* cvars including amx_sql_* ones. I tried to obtain these data in plugin_precache and thought they are empty because of wrong timing (i.e. config files are loaded after this native) but when I moved the code to plugin_init the issue is still persist. Could someone please explain why is that and what am I doing wrong?
I do not really care which of the functions I have to use: SQL_MakeStdTuple or SQL_MakeDbTuple, get_[p]cvar_string or anything else I simply do not want to write my own parser for the config file.
Last edited by damage220; 08-18-2023 at 12:43.
Reason: Solved