get_pcvar_string and read_flags
Ok....i'm trying to use flags for the pcvars and it isn't working.
Here is my code.... PHP Code:
Code:
The plugin is off 65536, 1Am i missing something? EDIT: aaannnnddd.....an episode of wtf theater.... It just doesn't recognize "source_spawn" as a cvar. When i changed the cvar name, it started working again. wtf!? |
Re: get_pcvar_string and read_flags
Register cvars in plugin_init() unless there is a good reason not to do so.
|
Re: get_pcvar_string and read_flags
65536 is 1 << 16, not sure if there is more to your code than what you are showing.
Are you using this flag? #define ADMIN_LEVEL_E (1<<16) /* flag "q" */ PHP Code:
Code:
The plugin is off 7 |
Re: get_pcvar_string and read_flags
client_print(id, print_console, "The plugin is off %d, %s", cvarBits, f)
If last value is "1" it means you have set the cvar to 1 instead of letters, read_flags can't work properly on this, also, you should be aware that cvar in converted only at map load, so if you change the cvar, restart the map. |
Re: get_pcvar_string and read_flags
Quote:
Quote:
Quote:
To everyone....any ideas why source_spawn might give strange results? Its probably just my server because bugsy tests it to run fine.... Anyone know a way to print all cvars registered in the server? |
Re: get_pcvar_string and read_flags
The only reason i can see is that the cvar is written in some file such as amxx.cfg, or is also created/changed in another plugin.
|
Re: get_pcvar_string and read_flags
I thought that too...but let me ask you. Does order in plugins.ini give a CVAR precedence like plugin commands? i.e. if a CVAR is defined in two plugins, does the one closest to the top get to keep its value while the other one malfunctions?
And is there a way for me to print all CVARs used in all plugins? |
Re: get_pcvar_string and read_flags
cvarlist ?
|
Re: get_pcvar_string and read_flags
Also if you run that plugin with another cvar name, you can check (after a real reboot of the server), if the previous cvar still exist, that would mean another plugin is creating it.
If it doesn't exist, and if a plugin tries to use it, could be some error logs depending on how that plugin handles the cvar manipulation. |
| All times are GMT -4. The time now is 05:47. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.