Raised This Month: $51 Target: $400
 12% 

[L4D & L4D2] Custom Player Stats v1.4B121


Post New Thread Reply   
 
Thread Tools Display Modes
Ja-Forces
Senior Member
Join Date: Jul 2009
Location: Leningrad
Old 10-19-2010 , 19:54   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1071

L 10/19/2010 - 23:28:12: SourceMod error session started
L 10/19/2010 - 23:28:12: Info (map "l4d_airport02_offices") (file "errors_20101019.log")
L 10/19/2010 - 23:28:12: [SM] Plugin encountered error 15: Array index is out of bounds
L 10/19/2010 - 23:28:12: [SM] Displaying call stack trace for plugin "l4d_stats.smx":
L 10/19/2010 - 23:28:12: [SM] [0] Line 6335, l4d_stats.sp::cmd_Say()
L 10/19/2010 - 23:51:51: Error log file session closed.
Ja-Forces is offline
nakashimakun
Senior Member
Join Date: Feb 2010
Location: England
Old 11-01-2010 , 10:45   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1072

Hey Muukis,

How goes work on this?

Just wondering if you'd done any changes yet I don't expect you to answer ASAP but I just wanted a little update of what you've been doing with Stats.
nakashimakun is offline
krlll
SourceMod Donor
Join Date: Feb 2010
Old 11-07-2010 , 07:40   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1073

Hi,

This plugin crashes my server. No info is written to the sourcemod logs. The only thing that appears is in the console log and that is:

./srcds_run: line 337: 19853 Alarm clock $HL_CMD

However, I wrote a test plugin using essentially the same code as this plugin and it works.

Here is the code:

PHP Code:
#include <sourcemod>

#define DB_CONF_NAME "l4dstats"

new Handle:db INVALID_HANDLE;

public 
Plugin:myinfo 
{
    
name "MySQL Connection Test",
    
author "krlll",
    
description "MySQL Connection Test",
    
version "0.0.0.1",
    
url "<- URL ->"
}

public 
OnPluginStart()
{
        if(!
ConnectDB())
    {
        
SetFailState("Connecting to database failed. Read error log for further details.");
    }
}

bool:ConnectDB()
{
    if (
db != INVALID_HANDLE)
        return 
true;
    
    if (
SQL_CheckConfig(DB_CONF_NAME))
    {
        
decl String:Error[256];
        
db SQL_Connect(DB_CONF_NAMEtrueErrorsizeof(Error));
        
        if (
db == INVALID_HANDLE)
        {
            
LogError("Failed to connect to database: %s"Error);
            return 
false;
        }
        else if (!
SQL_FastQuery(db"SET NAMES 'utf8'"))
        {
            if (
SQL_GetError(dbErrorsizeof(Error)))
                
LogError("Failed to update encoding to UTF8: %s"Error);
            else
            
LogError("Failed to update encoding to UTF8: unknown");
        }
        
        if(!
CheckDatabaseValidity(""))
        {
            
LogError("Database is missing required table or tables.");
            return 
false;
        }
    }
    else
    {
        
LogError("Databases.cfg missing '%s' entry!"DB_CONF_NAME);
        return 
false;
    }
    
LogMessage("DataBase Connected!");
    return 
true;
}

bool:CheckDatabaseValidity(const String:Prefix[])
{
    if (!
DoFastQuery(0"SELECT * FROM %splayers WHERE 1 = 2"Prefix) ||
    !
DoFastQuery(0"SELECT * FROM %smaps WHERE 1 = 2"Prefix) ||
    !
DoFastQuery(0"SELECT * FROM %stimedmaps WHERE 1 = 2"Prefix) ||
    !
DoFastQuery(0"SELECT * FROM %ssettings WHERE 1 = 2"Prefix))
    {
        return 
false;
    }
    
    return 
true;
}

bool:DoFastQuery(Client, const String:Query[], any:...)
{
    new 
String:FormattedQuery[4096];
    
VFormat(FormattedQuerysizeof(FormattedQuery), Query3);
    
    new 
String:Error[1024];
    
    if (!
SQL_FastQuery(dbFormattedQuery))
    {
        if (
SQL_GetError(dbErrorsizeof(Error)))
        {
            
PrintToConsole(Client"[RANK] Fast query failed! (Error = \"%s\") Query = \"%s\""ErrorFormattedQuery);
            
LogError("Fast query failed! (Error = \"%s\") Query = \"%s\""ErrorFormattedQuery);
        }
        else
        {
            
PrintToConsole(Client"[RANK] Fast query failed! Query = \"%s\""FormattedQuery);
            
LogError("Fast query failed! Query = \"%s\""FormattedQuery);
        }
        
        return 
false;
    }
    
    return 
true;
}
public 
OnPluginEnd()
{
    if(
db != INVALID_HANDLE)
        
CloseHandle(db);

I've used sourcemod versions 1.3.5, 1.3.6 and now 1.4.0-hg3146.

Is there anyone who has their server hosted by gameservers.com have this thing working?
krlll is offline
matrixmark
Senior Member
Join Date: Jun 2010
Old 11-07-2010 , 10:10   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1074

I've got Muukis's version working fine and no errors like the one your experiencing.


Code:
 
SourceMod Version: 1.4.0-dev
             SourcePawn Engine: SourcePawn 1.1, jit-x86 (build 1.4.0-dev)
 
Metamod:Source version 1.9.0-dev
         Build ID: 735:11c3e8ffa766-dev
 
22 "Custom Player Stats" (1.4B101) by Mikko Andersson (muukis)

Last edited by matrixmark; 11-07-2010 at 13:46.
matrixmark is offline
Inker
SourceMod Donor
Join Date: Dec 2008
Old 11-12-2010 , 03:41   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1075

Ive been suddenly getting this error since yesterday:

L 11/12/2010 - 0156: Info (map "c1m1_hotel") (file "errors_20101112.log")
L 11/12/2010 - 0156: [CLIENTPREFS] [2003]: Can't connect to MySQL server (10060)
L 11/12/2010 - 017:20: [l4d_stats.smx] Failed to connect to database: [2003]: Can't connect to MySQL server (10060)
L 11/12/2010 - 017:20: [SM] Plugin encountered error 25: Call was aborted
L 11/12/2010 - 017:20: [SM] Native "SetFailState" reported: Connecting to database failed. Read error log for further details.
L 11/12/2010 - 017:20: [SM] Displaying call stack trace for plugin "l4d_stats.smx":
L 11/12/2010 - 017:20: [SM] [0] Line 948, /home/groups/alliedmodders/forums/files/5/2/0/8/2/66015.attach::OnConfigsExecuted()

Any idea why this would be happening? I havent installed anything new on the server since then and I havent touched the database at all.
Inker is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 11-12-2010 , 03:57   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1076

Quote:
Originally Posted by nakashimakun View Post
Hey Muukis,

How goes work on this?

Just wondering if you'd done any changes yet I don't expect you to answer ASAP but I just wanted a little update of what you've been doing with Stats.
No news for you yet, I'm sorry. I have not been able to do much work on the subject.

Quote:
Originally Posted by Inker View Post
Ive been suddenly getting this error since yesterday:

L 11/12/2010 - 0156: Info (map "c1m1_hotel") (file "errors_20101112.log")
L 11/12/2010 - 0156: [CLIENTPREFS] [2003]: Can't connect to MySQL server (10060)
L 11/12/2010 - 017:20: [l4d_stats.smx] Failed to connect to database: [2003]: Can't connect to MySQL server (10060)
L 11/12/2010 - 017:20: [SM] Plugin encountered error 25: Call was aborted
L 11/12/2010 - 017:20: [SM] Native "SetFailState" reported: Connecting to database failed. Read error log for further details.
L 11/12/2010 - 017:20: [SM] Displaying call stack trace for plugin "l4d_stats.smx":
L 11/12/2010 - 017:20: [SM] [0] Line 948, /home/groups/alliedmodders/forums/files/5/2/0/8/2/66015.attach::OnConfigsExecuted()

Any idea why this would be happening? I havent installed anything new on the server since then and I havent touched the database at all.
Things to check out:
  • MySQL server is up and running.
  • IP of the MySQL server host has not changed and/or the domain name is directed to the correct IP.
  • IP of the game server host has not changed and/or the domain name is directed to the correct IP Depending on how the MySQL server user access is configured.
  • Firewall settings on both ends have not changed and are functional.
__________________
Monster Hunter

Though certainly not superhuman, the man's prowess inspires an excess of whispered rumors. But those rumors remain in the realm of speculation.
muukis is offline
nakashimakun
Senior Member
Join Date: Feb 2010
Location: England
Old 11-12-2010 , 04:48   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1077

Quote:
Originally Posted by muukis View Post
No news for you yet, I'm sorry. I have not been able to do much work on the subject.
Sorry for bothering you. Its alright that you haven't had time I fully understand ... Working 60 hours a week then at weekends im busy so I don't have much time to support my own Sourcemod Plugin. But I wish you well

Keep up the good work.
nakashimakun is offline
Inker
SourceMod Donor
Join Date: Dec 2008
Old 11-12-2010 , 12:03   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1078

Quote:
Originally Posted by muukis View Post
Things to check out:
  • MySQL server is up and running.
  • IP of the MySQL server host has not changed and/or the domain name is directed to the correct IP.
  • IP of the game server host has not changed and/or the domain name is directed to the correct IP Depending on how the MySQL server user access is configured.
  • Firewall settings on both ends have not changed and are functional.
Ok, so I've verified that everything connects fine when the plugin is installed on a different game server, so would it most likely be a firewall issue from the game server that cannot connect to the database?
Inker is offline
Inker
SourceMod Donor
Join Date: Dec 2008
Old 11-12-2010 , 13:46   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1079

actually never mind, I've resolved the issue. It was an issue with the webhost firewall, but everything should be fixed now.
Inker is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 11-13-2010 , 13:05   Re: [L4D & L4D2] Custom Player Stats v1.4B101
Reply With Quote #1080

Quote:
Originally Posted by nakashimakun View Post
Sorry for bothering you. Its alright that you haven't had time I fully understand ... Working 60 hours a week then at weekends im busy so I don't have much time to support my own Sourcemod Plugin. But I wish you well

Keep up the good work.
It's no problem. I understand that some of you are hoping for constant updates or at least occasional updates. I wish I was able to accomplish something real soon, but currently I'm trying to cope with the other "problems" I have in life, that have priority level of an exponential level compared to this plugin ;)

Thanks for understanding

Quote:
Originally Posted by Inker View Post
actually never mind, I've resolved the issue. It was an issue with the webhost firewall, but everything should be fixed now.
I'm glad to hear that!
__________________
Monster Hunter

Though certainly not superhuman, the man's prowess inspires an excess of whispered rumors. But those rumors remain in the realm of speculation.
muukis is offline
Reply



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 22:14.


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