Author Topic: RTB Prefs Help [Unsolved]  (Read 837 times)

I have been having some issues hosting my dedicated server (CBM) using RTB.
Now, it works sometimes, but now it isn't working at all. The server prefs won't show, it will only show something that says "Tests" and nothing else. I tried removing a few mods that might add onto the prefs list but it still didn't work. I'm not sure how to fix this. There are a few things in there that I need to edit in order to host the server with no issues but I'm not sure what I need to do to fix this.

Which version of RTB are you using?

Which version of RTB are you using?

It says 4.05, is the version the reason why it isn't working?
Do you have a link?

I found the cause ages ago but it seems like noone cares about it. The problem is that badly written add-ons execute servercontrol.cs again without first checking if it was loaded, resetting the counter and basically deleting all previously created prefs. The fix is as simple as placing something like this at the top:

//Check if module has already been loaded
if($RTB::Hooks::ServerControl == 1)
{
   error("    Why are you randomly executing this file?");
   return;
}

add the code he posted to the top of the serverControl.cs file in rtb. here's the file path: rtb.zip or whatever it's called/hooks/serverControl.cs
this worked for me and made all my rtb prefs load.

Now it won't let me view any of the prefs and it won't allow me to change the server gamemode, it says "No server preferences are available" when there is.