Author Topic: RTB_registerPref breaking server control  (Read 568 times)

i'm trying to update my mod, but my rtb prefs seem to be breaking server control, what am i doing wrong?

if(!$Whitelist::Prefs)
{
   if(isFile("Add-Ons/System_ReturnToBlockland/server.cs"))
   {
      if(!$RTB::RTBR_ServerControl_Hook)
         exec("Add-Ons/System_ReturnToBlockland/RTBR_ServerControl_Hook.cs");
      RTB_registerPref("Enabled","Whitelist","$Whitelist::Enabled","bool","Server_Whitelist",0,0,0);
      RTB_registerPref("Add to Whitelist","Whitelist","$Whitelist::Level1","list admin 1 SuperAdmin 2 Host 3","Server_WhiteList",2,0,0);
      RTB_registerPref("Remove from Whitelist","Whitelist","$Whitelist::Level2","list admin 1 SuperAdmin 2 Host 3","Server_WhiteList",2,0,0);
      RTB_registerPref("View Whitelist","Whitelist","$Whitelist::Level3","list admin 1 SuperAdmin 2 Host 3","Server_WhiteList",1,0,0);
      $Whitelist::Prefs = 1;
   }
   else
   {
      $Whitelist::Enabled = 0;
      $Whitelist::Level1 = 2;
      $Whitelist::Level2 = 2;
      $Whitelist::Level3 = 1;
      $Whitelist::Prefs = 1;
   }
}

I dont see anything obvious with the code you posted.

how does it break server control?

with the mod enabled, the server control button does not appear on the admin menu.

check for console errors?

none. i just commented everything but the variables, and it still breaks it, so its somewhere in the main code, but idk what.
here's some of the code that i think MAY be causing the problem somehow.

-sneaky solved snip-
« Last Edit: May 16, 2011, 09:32:42 PM by Ipquarx »

time to work on your debugging skills.

somewhere there is an error thats stopping the button from showing up.
you may need to open your console.log in notepad and look over it carefully.

no need. i rummaged through the RTB code, and it needs a arg in onconnectrequest that did not exist in my script to be something other than null. problem solved, removing code, locking topic.