Raised This Month: $ Target: $400
 0% 

Solved get_cvar_string( returns empty string for amx_* cvars


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
damage220
Member
Join Date: Jul 2022
Location: Ukraine
Old 08-17-2023 , 20:14   get_cvar_string( returns empty string for amx_* cvars
Reply With Quote #1

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
damage220 is online now
 



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 00:33.


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