Raised This Month: $32 Target: $400
 8% 

Solved AutoExecConfig not creating file


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 05-18-2020 , 15:37   AutoExecConfig not creating file
Reply With Quote #1

AutoExecConfig is not creating the config file all of a sudden.

It worked fine one day ago, then recently I wanted to reset it so I deleted the .cfg file. Now it won't recreate one when I restart the server.

My code:
Code:
public void OnPluginStart() {
	// CVars
	AutoExecConfig_SetFile("warden", "BetterWarden"); // What's the configs name and location?
	AutoExecConfig_SetCreateFile(true); // Create config if it does not exist
	...
	AutoExecConfig_CreateConVar(...);
	...
	AutoExecConfig_ExecuteFile(); // Execute the config
	AutoExecConfig_CleanFile(); // Clean the .cfg from spaces etc.
}
Anyone know why this is happening? I can't seem to find any errors in the logs either.

Another issue is that the connection to a database is not working. So it would seem that the plugin is not initiating properly. Which is really weird..

EDIT
When in-game and doing sm_cvar my_cvar it finds the cvar and its value. So the CVars are being created, but not the actual config file somehow...
__________________

Last edited by condolent; 05-19-2020 at 15:35.
condolent is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 05-18-2020 , 16:22   Re: AutoExecConfig not creating file
Reply With Quote #2

So after some more testing on another PC. It seems that if I delete the cfg-files and restart the server, the cfg won't re-generate. Some kind of caching? Is this something anybody else experienced?
__________________
condolent is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 05-19-2020 , 05:34   Re: AutoExecConfig not creating file
Reply With Quote #3

https://sm.alliedmods.net/new-api/so...AutoExecConfig

And convars created with flag FCVAR_DONTRECORD, not save in config file.
__________________
Do not Private Message @me
Bacardi is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 05-19-2020 , 05:54   Re: AutoExecConfig not creating file
Reply With Quote #4

Quote:
Originally Posted by Bacardi View Post
This is https://forums.alliedmods.net/showthread.php?t=204254, not SM's native support.
__________________
asherkin is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 05-19-2020 , 12:05   Re: AutoExecConfig not creating file
Reply With Quote #5

Quote:
Originally Posted by asherkin View Post
Precisely!
__________________
condolent is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 05-19-2020 , 12:35   Re: AutoExecConfig not creating file
Reply With Quote #6

Sorry
__________________
Do not Private Message @me
Bacardi is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 05-19-2020 , 15:30   Re: AutoExecConfig not creating file
Reply With Quote #7

I'm still having issues with this. Anyone know what this might be because of?
I even tried changing what .cfg name it should create and it never got created.

Quote:
Originally Posted by Bacardi View Post
Sorry
No worries!
__________________
condolent is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 05-19-2020 , 15:35   Re: AutoExecConfig not creating file
Reply With Quote #8

SOLVED

This was needed nowadays:
Code:
AutoExecConfig_SetCreateDirectory(true);
__________________
condolent is offline
Reply



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 20:59.


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