AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved AutoExecConfig not creating file (https://forums.alliedmods.net/showthread.php?t=324524)

condolent 05-18-2020 15:37

AutoExecConfig not creating file
 
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...

condolent 05-18-2020 16:22

Re: AutoExecConfig not creating file
 
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?

Bacardi 05-19-2020 05:34

Re: AutoExecConfig not creating file
 
https://sm.alliedmods.net/new-api/so...AutoExecConfig

And convars created with flag FCVAR_DONTRECORD, not save in config file.

asherkin 05-19-2020 05:54

Re: AutoExecConfig not creating file
 
Quote:

Originally Posted by Bacardi (Post 2700977)

This is https://forums.alliedmods.net/showthread.php?t=204254, not SM's native support.

condolent 05-19-2020 12:05

Re: AutoExecConfig not creating file
 
Quote:

Originally Posted by asherkin (Post 2700980)

Precisely!

Bacardi 05-19-2020 12:35

Re: AutoExecConfig not creating file
 
Sorry

condolent 05-19-2020 15:30

Re: AutoExecConfig not creating file
 
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 (Post 2701049)
Sorry

No worries!

condolent 05-19-2020 15:35

Re: AutoExecConfig not creating file
 
SOLVED

This was needed nowadays:
Code:

AutoExecConfig_SetCreateDirectory(true);


All times are GMT -4. The time now is 06:34.

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