Raised This Month: $32 Target: $400
 8% 

Database.cfg - Error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RedPowder
New Member
Join Date: Apr 2016
Old 04-24-2016 , 01:12   Database.cfg - Error
Reply With Quote #1

Hello,
So I'm currently trying to set up Sourceban on my CS:GO server and from what I can see I've done everything correctly and followed the instructions best to my abilities. I'm not sure what if anything that I have missed out or maybe if its just an actual error. The Issue I'm having is that when I ban someone on the server the ban does not go to the database or register on the web panel but it does store the ban somewhere. *If you know where the ban gets stored please also let me know for future reference*

Web Panel - Different server

CSGO and Database - Same Server

So the web server is connecting to the database and made all the correct tables but the CSGO server isn't connecting to the database which is on the same server.
I'm also able to ban people with the sm_ban command so made it is reading the database and getting my steam id but not writing to it?

ERRORS
Code:
L 04/24/2016 - 00:44:52: SourceMod error session started
L 04/24/2016 - 00:44:52: Info (map "workshop/241267905/aim_multi_v4") (file "errors_20160424.log")
L 04/24/2016 - 00:44:52: [SM] Native "Database.Escape" reported: Invalid database Handle 0 (error: 4)
L 04/24/2016 - 00:44:52: [SM] Displaying call stack trace for plugin "sourcebans.smx":
L 04/24/2016 - 00:44:52: [SM]   [0]  Line 359, /Users/Tsunami/Documents/Projects/SourceBans/master/game/addons/sourcemod/scripting/sourcebans.sp::Native_Escape()
L 04/24/2016 - 00:44:52: [SM] Native "SB_Escape" reported: Error encountered while processing a dynamic native
L 04/24/2016 - 00:44:52: [SM] Displaying call stack trace for plugin "sb_bans.smx":
L 04/24/2016 - 00:44:52: [SM]   [0]  Line 624, /Users/Tsunami/Documents/Projects/SourceBans/master/game/addons/sourcemod/scripting/sb_bans.sp::Timer_ProcessQueue()
L 04/24/2016 - 00:55:31: Error log file session closed.


Database.cfg
Code:
"Databases"
{
	"driver_default"		"mysql"
	
	// When specifying "host", you may use an IP address, a hostname, or a socket file path
	
	"multi1v1"
	{
		"driver"			"default"
		"host"				"localhost"
		"database"			"csgo"
		"user"				"root"
		"pass"				"xxxxxxxx"
		//"timeout"			"0"
		//"port"			"0"
	}
	
	"storage-local"
	{
		"driver"			"sqlite"
		"database"			"sourcemod-local"
	}

	"clientprefs"
	{
		"driver"			"sqlite"
		"host"				"localhost"
		"database"			"clientprefs-sqlite"
		"user"				"root"
		"pass"				""
		//"timeout"			"0"
		//"port"			"0"
	}
}
	"clientprefs"
	{
		"driver"			"sqlite"
		"host"				"localhost"
		"database"			"clientprefs-sqlite"
		"user"				"root"
		"pass"				""
		//"timeout"			"0"
		//"port"			"0"
	}
}

	"sourcebans"
	{
		"driver"		"mysql"
		"host"			"localhost"	// The host where your mysql server is located
		"database"		"sourcebans"	// The name of the database
		"user"			"root"		// The name of the user that the plugin should use to connect
		"pass"			"xxxxxxxx"	// The password for this user
                "port"			"3306"
	}
}
/**
* SourceBans Configuration File
*
* @author GameConnect
* @version 2.0.0
* @copyright SourceBans (C)2007-2016 GameConnect.net. All rights reserved.
* @package SourceBans
* @link http://www.sourcebans.net
*/


sourcebans.cfg
Code:
"SourceBans"
{
    "Config"
    {
        // Website address to tell where the player to go for unban, etc
        "Website"						"xxxxxxxxxxxxxxxxx"

        // Allow or disallow admins access to sm_addban command
        "Addban"						"1"

        // Allow or disallow admins access to sm_unban command
        "Unban"							"1"

        // The table prefix you set while installing the webpanel. Default: "sb_"
        "DatabasePrefix"		"sb_"

        // How many seconds to wait before retrying when a players ban fails to be checked. Min = 15.0 Max = 60.0
        "RetryTime"					"45.0"

        // How often should we process the failed ban queue in minutes
        "ProcessQueueTime"	"5"

        // Require the admin to login once into the webpanel
        "RequireSiteLogin"	"0"

        // If your game server is behind NAT or -ip is not set on startup,
        // enter the public IP address or hostname of your game server below
        "ServerIP"					""
    }

    /*
     * Menu options for ban times
     */
    "BanTimes"
    {
        "Permanent"
        {
            "flags"		""
            "length"	"0"
        }
        "10 Minutes"
        {
            "flags"		""
            "length"	"10"
        }
        "30 Minutes"
        {
            "flags"		""
            "length"	"30"
        }
        "1 Hour"
        {
            "flags"		""
            "length"	"60"
        }
        "4 Hours"
        {
            "flags"		""
            "length"	"240"
        }
        "1 Day"
        {
            "flags"		""
            "length"	"1440"
        }
        "1 Week"
        {
            "flags"		""
            "length"	"10080"
        }
    }

    /*
     * Menu options for if a reason isn't supplied in a ban
     * Without a supplied reason the ban will never be written to the database
     */
    "BanReasons"
    {
        "1"	"Hacking"
        "2"	"General Exploit of Game/Map/Server"
        "3"	"Team Killing"
        "4"	"Team Flashing"
        "5"	"Spamming Mic/Chat"
        "6"	"Inappropriate Spray"
        "7"	"Inappropriate Language"
        "8"	"Inappropriate Name"
        "9"	"Ignoring Admins"
        "0"	"Team Stacking"
        "11"	"Own Reason"
    }

    /*
     * Submenu options for when "Hacking" is selected
     * If "Hacking" removed from the menu above this will not be accessible
     */
    "HackingReasons"
    {
        "1"	"Aimbot"
        "2"	"Anti Recoil"
        "3"	"Wallhack"
        "4"	"Spinhack"
        "5"	"Speedhack"
        "6"	"Multi-Hack"
        "7"	"No Smoke"
        "8"	"No Flash"
    }
}
__________________

Last edited by RedPowder; 04-24-2016 at 08:56.
RedPowder is offline
Benedevil
Junior Member
Join Date: Mar 2016
Old 04-24-2016 , 10:45   Re: Database.cfg - Error
Reply With Quote #2

Code:
"Databases"
{
	"driver_default"		"mysql"
	
	// When specifying "host", you may use an IP address, a hostname, or a socket file path
	
	"multi1v1"
	{
		"driver"			"default"
		"host"				"localhost"
		"database"			"csgo"
		"user"				"root"
		"pass"				"xxxxxxxx"
		//"timeout"			"0"
		//"port"			"0"
	}
	
	"storage-local"
	{
		"driver"			"sqlite"
		"database"			"sourcemod-local"
	}

	"clientprefs"
	{
		"driver"			"sqlite"
		"host"				"localhost"
		"database"			"clientprefs-sqlite"
		"user"				"root"
		"pass"				""
		//"timeout"			"0"
		//"port"			"0"
	}
	"clientprefs"
	{
		"driver"			"sqlite"
		"host"				"localhost"
		"database"			"clientprefs-sqlite"
		"user"				"root"
		"pass"				""
		//"timeout"			"0"
		//"port"			"0"
	}

	"sourcebans"
	{
		"driver"		"mysql"
		"host"			"localhost"	// The host where your mysql server is located
		"database"		"sourcebans"	// The name of the database
		"user"			"root"		// The name of the user that the plugin should use to connect
		"pass"			"xxxxxxxx"	// The password for this user
                "port"			"3306"
	}
}
You had 2 brackets that were closing the "Databases" section at random parts.

Last edited by Benedevil; 04-24-2016 at 10:46.
Benedevil is offline
RedPowder
New Member
Join Date: Apr 2016
Old 04-24-2016 , 12:10   Re: Database.cfg - Error
Reply With Quote #3

Quote:
Originally Posted by Benedevil View Post
Code:
"Databases"
{
	"driver_default"		"mysql"
	
	// When specifying "host", you may use an IP address, a hostname, or a socket file path
	
	"multi1v1"
	{
		"driver"			"default"
		"host"				"localhost"
		"database"			"csgo"
		"user"				"root"
		"pass"				"xxxxxxxx"
		//"timeout"			"0"
		//"port"			"0"
	}
	
	"storage-local"
	{
		"driver"			"sqlite"
		"database"			"sourcemod-local"
	}

	"clientprefs"
	{
		"driver"			"sqlite"
		"host"				"localhost"
		"database"			"clientprefs-sqlite"
		"user"				"root"
		"pass"				""
		//"timeout"			"0"
		//"port"			"0"
	}
	"clientprefs"
	{
		"driver"			"sqlite"
		"host"				"localhost"
		"database"			"clientprefs-sqlite"
		"user"				"root"
		"pass"				""
		//"timeout"			"0"
		//"port"			"0"
	}

	"sourcebans"
	{
		"driver"		"mysql"
		"host"			"localhost"	// The host where your mysql server is located
		"database"		"sourcebans"	// The name of the database
		"user"			"root"		// The name of the user that the plugin should use to connect
		"pass"			"xxxxxxxx"	// The password for this user
                "port"			"3306"
	}
}
You had 2 brackets that were closing the "Databases" section at random parts.
This was the issue and everything seems to be working perfect.
Thank you for all your help and taking time out of your day to support my project.


This topic can be locked - /locked
__________________
RedPowder is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode