Guest User

Untitled

a guest
Jan 5th, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
4CS 2.15 KB | None | 0 0
  1. //-----------------------------------------------------------------------------
  2. // Torque
  3. // Copyright GarageGames, LLC 2011
  4. //-----------------------------------------------------------------------------
  5.  
  6. // First we execute the core default preferences.
  7. exec( "core/scripts/server/defaults.cs" );
  8.  
  9.  
  10. // Now add your own game specific server preferences as
  11. // well as any overloaded core defaults here.
  12.  
  13. $Pref::Server::DB::Software = 5; // 0 - MySQL Local, 1 - MySQL Remote, 2 - SQL Serv 2000, 3 - SQL Serv 2005, 4 - Oracle
  14. $Pref::Server::DB::Port = "3306"; // DB Port number
  15. $Pref::Server::DB::Server = "localhost"; // Server's url or ip
  16. $Pref::Server::DB::Database = "collateral"; // Database name
  17. $Pref::Server::DB::User = "root"; // username
  18. $Pref::Server::DB::Password = "stellina136"; // password
  19.  
  20. //check platform for which driver to use
  21. if ($platform $= "windows")
  22. {
  23.    //check database they are using
  24.    switch($Pref::Server::DB::Software)
  25.    {
  26.       case 0:
  27.       $Pref::Server::DB::Driver = "MySQL ODBC 3.51 Driver";
  28.       case 1:
  29.       $Pref::Server::DB::Driver = "MySQL ODBC 3.51 Driver";
  30.       case 2:
  31.       $Pref::Server::DB::Driver = "SQL Server";
  32.       case 3:
  33.       $Pref::Server::DB::Driver = "SQL Native Client";
  34.       case 4:
  35.       $Pref::Server::DB::Driver = "Microsoft ODBC for Oracle";
  36.       case 5:
  37.       $Pref::Server::DB::Driver = "MySQL ODBC 5.1 Driver";
  38.       default:
  39.       $Pref::Server::DB::Driver = "ERROR: UNKNOWN DATABASE:" SPC $Pref::Server::DB::Database;
  40.    }
  41. }
  42. else
  43. {
  44.    //check database they are using
  45.    switch($Pref::Server::DB::Software)
  46.    {
  47.       case 0:
  48.       $Pref::Server::DB::Driver = "MySQL";
  49.       case 1:
  50.       $Pref::Server::DB::Driver = "MySQL";
  51.       case 2:
  52.       $Pref::Server::DB::Driver = "ERROR: SQL SERVER NOT SUPPORTED BY LINUX";
  53.       case 3:
  54.       $Pref::Server::DB::Driver = "ERROR: SQL SERVER NOT SUPPORTED BY LINUX";
  55.       case 4:
  56.       $Pref::Server::DB::Driver = "Oracle";
  57.       case 5:
  58.       $Pref::Server::DB::Driver = "MySQL";
  59.       default:
  60.       $Pref::Server::DB::Driver = "ERROR: UNKNOWN DATABASE:" SPC $Pref::Server::DB::Database;
  61.    }
  62. }
  63.  
  64.  
  65. // Finally load the preferences saved from the last
  66. // game execution if they exist.
Add Comment
Please, Sign In to add comment