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.