Author Topic: Correctly searching a string?[Solved]  (Read 1124 times)

Or you use $Pref::Server:blah and it will auto-save to config/server/prefs.cs

May use this.

It's basically every time I execute the script, because I had "$Namehere = "Lol";", it will set $Namehere to "Lol".

Let's say I change $Namehere to "Rofl", when I execute the script it will reset it to "Lol", but I want it to stay "Rofl".

At the beginning of the script
$Namehere = "Lol";
Replace with
if($Pref::Server::$Namehere $= "")$Pref::Server::$Namehere $= "Lol";
Then it will stay like you set it but be set to Lol when you execute the script the very first tim

Note that it will be set back to Lol if you execute the script while the last value was ""

if($Namehere $= "") $Namehere = "Lol";

if($Namehere $= "") $Namehere = "Lol";
Then it won't autosave



Sorry forgot to put "Solved", I already got it working, but thanks all!