Re: [INCLUDE] Autoexecconfig read and append beta
nice - thank you Impact!
|
Re: [INCLUDE] Autoexecconfig read and append beta
Very nice work, I have only just seen this thread.
I made a plugin which does something similar. Backup the cvar configs, have plugins generate new configs and update any custom cvar values. http://forums.alliedmods.net/showthread.php?t=188756 for those plugins which do not use the include. |
Re: [INCLUDE] Autoexecconfig read and append beta
Another Update.
Thanks to Peace-Maker, the include is now a little bit easier to use, especially for bigger plugins. Instead of using PHP Code:
PHP Code:
The include is now able to create the configfile by itself if it doesn't exists, by default this is disabled and can be enabled like this PHP Code:
PHP Code:
PHP Code:
Impact |
Re: [INCLUDE] Autoexecconfig read and append beta
Thank you Impact :)
Now I'll be using this for all plugins, including the first release :D |
Re: [INCLUDE] Autoexecconfig read and append beta
Just now finding this, where has this been all my life! Now to update all my plugins to use it.
Side note, missing ; on line 154. |
Re: [INCLUDE] Autoexecconfig read and append beta
yes, I meant to post that earlier today about the missing ;
The end of line 150 is where it needs a ";" strcopy(g_sFolderPath, sizeof(g_sFolderPath), folder) Pull request sent |
Re: [INCLUDE] Autoexecconfig read and append beta
My personal coding style is that i use the semicolon enforcing after including files, because of that i couldn't saw the warning.
The pull request by TnTSCS was merged (thank you), and the order of the pragmas in the testsuite were switched, it shouldn't happen again. Thanks for letting me know, sorry for the inconveniences. Yours sincerely Impact |
Re: [INCLUDE] Autoexecconfig read and append beta
I would like to use this, but perhaps it doesn't do what I thought. I see that it's adding new cvars, but none of the default values change when I change them, not even the version. Does this not update default values, descriptions, etc. of existing cvars?
Edit: What I want, is that when I update a plugin, the user's corresponding .cfg file automatically: 1. Updates all of the data to existing cvar, such as default value, description, minimum value 2. Adds any new cvars 3. Removes any cvars that have been removed from the plugin 4. If a cvar already exists, leaves any user entered values in place 5. User comments left in place What I don't care about so much: User commands/cvars unrelated to the plugin being removed Does this include have all of those, or part of those capabilities? |
Re: [INCLUDE] Autoexecconfig read and append beta
How would you change to default value?
|
Re: [INCLUDE] Autoexecconfig read and append beta
Quote:
PHP Code:
|
All times are GMT -4. The time now is 08:44. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.