View Single Post
Kigen
BANNED
Join Date: Feb 2008
Old 10-13-2010 , 10:24   Re: Very Basic Player Tracker (Updated 7/15/10)
Reply With Quote #43

Code:
// Connection error logging
public SQL_GetDatabase(Handle:owner, Handle:hndl, const String:error[], any:data)
{
    new String:Error[1024];

    if ( hndl == INVALID_HANDLE )
    {
        LogToFile(Logfile, "Failed to connect to database: %s", Error);
        SetFailState("Failed to connect to the database");
    }
Should be:

Code:
// Connection error logging
public SQL_GetDatabase(Handle:owner, Handle:hndl, const String:error[], any:data)
{
	if ( hndl == INVALID_HANDLE )
	{
		LogToFile(Logfile, "Failed to connect to database: %s", error);
		SetFailState("Failed to connect to the database");
	}
As the error message is given from the call of the function.
Kigen is offline