ServerPrefs Overwrite

My serverprefs.cs file keeps reverting back to the original file. I have edited one in a different folder and have copied and pasted it in the prefs folder, overwriting the current file. When I start the server up it goes through the NoResponse Loop and when I kill it and start it the second time, it will kick back an connection error which states to check my network configuration. I have found that when I return to the prefs folder again, it has been replaced with the original default serverprefs.cs (You know, the one with the passwords as "changethis".... Okay just making sure you know what I'm talking about.)

Comments

  • I believe T2 will overwrite your ServerPrefs.cs file with the default version if, for some reason, your altered settings are not valid (syntax error in the file).

    Try copying & renaming your altered ServerPrefs.cs file (perhaps something like MyServerPrefs.cs), and once your server has loaded you can try exec'ing it to see if there is an error.
    exec("prefs/ServerPrefs.cs");
    
    If there is an error you should be able to track it down based on the error in the console.

    Alternatively you could post your ServerPrefs.cs file here (excluding your passwords, obviously). :)
  • What he said, Also are you deleting all dsos, or at least the dso of serverprefs or whatever file you edit?
  • I believe T2 will overwrite your ServerPrefs.cs file with the default version if, for some reason, your altered settings are not valid (syntax error in the file).

    Try copying & renaming your altered ServerPrefs.cs file (perhaps something like MyServerPrefs.cs), and once your server has loaded you can try exec'ing it to see if there is an error.
    exec("prefs/ServerPrefs.cs");
    
    If there is an error you should be able to track it down based on the error in the console.

    Alternatively you could post your ServerPrefs.cs file here (excluding your passwords, obviously). :)

    I know it is possible to have GVar's setup in such a way that when exported it produces an erroneous variable name to raise a syntax error.
    // Array access is performed by collapsing into a unique variable name, and this behavior is reflected when values are exported, and so it's possible to export files with syntax errors
    $SomeVar::Name[";"] = "Blah"; // Exported as $SomeVar::Name; = "Blah";
    

    So something like that might have happened somehow.
Sign In or Register to comment.