AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Custom Player Stats v1.4B121 (https://forums.alliedmods.net/showthread.php?t=115965)

punkrockerlocker 01-23-2010 03:59

Re: [L4D & L4D2] Custom Player Stats v1.4B46
 
1 Attachment(s)
I do not have website; I am running this on localhost using PHP 5 and MySQL. Does this plugin absolutely require a webserver?

I have already edit the config.php. Error log is attached.

I have tried running createtable.php through my web browser but it opens the file in notepad.

Thanks for helping me out btw.

Llama1 01-23-2010 11:24

Re: [L4D & L4D2] Custom Player Stats v1.4B46
 
Yes you need webserver to display statistics. Also thereis a php script to create needed database tables.

In other words. You need to run createtable.php or upgradetable.php from your webserver in order to create new tables or update existing.

muukis 01-23-2010 14:40

Re: [L4D & L4D2] Custom Player Stats v1.4B46
 
Quote:

Originally Posted by punkrockerlocker (Post 1064203)
I do not have website; I am running this on localhost using PHP 5 and MySQL. Does this plugin absolutely require a webserver?

I have already edit the config.php. Error log is attached.

I have tried running createtable.php through my web browser but it opens the file in notepad.

Thanks for helping me out btw.

The error logs are saying that you have not installed the tables, but the connetion is working. Your web browser won't execute the PHP-scripts unless you have a web server with PHP running.

The plugin and the webstats are not depending on each other, so you can have either of them running without the other. Both of them are depending on MySQL though and a correct version of stats DB. You have to have the DB fixed and ready for either of them to work. Easiest way to create the tables to the DB is by using the PHP-scripts. You can however, create the tables without the scripts. To do that, you'll have to examine the scripts and execute the queries manually from MySQL console.

If you have installed the PHP, try opening the webstats folder to a command prompt and execute ./php createtable.php. Not sure if that works?

You won't have the interface to browse your stats with the web interface, but you can start collecting data and see a little bit of it with the in-game stats interface... maybe this is your reason of not installing a web server?

secfeniks 01-23-2010 16:30

Re: [L4D & L4D2] Custom Player Stats v1.4B46
 
great job with this plugin "Muukis"

left 4 dead 2
SourceMod version 1.3.1 / Metamod: Source 1.8

But here it does not work.

error log it appears that
L 01/23/2010 - 19:14:54: [l4d_stats.smx] Databases.cfg missing 'l4dstats' entry!
L 01/23/2010 - 19:14:54: [SM] Plugin encountered error 25: Call was aborted
L 01/23/2010 - 19:14:54: [SM] Native "SetFailState" reported: Connecting to database failed. Read error log for further details.
L 01/23/2010 - 19:14:54: [SM] Displaying call stack trace for plugin "l4d_stats.smx":
L 01/23/2010 - 19:14:54: [SM] [0] Line 537, / home/groups/alliedmodders/forums/files/5/2/0/8/2/57698.attach: OnPluginStart ( )

the sm plugins list

] Sm plugins list
[SM] Listing 18 plugins:
01 "Admin File Reader" (1.3.1-dev) by AlliedModders LLC
02 "Admin Help" (1.3.1-dev) by AlliedModders LLC
03 "Admin Menu" (1.3.1-dev) by AlliedModders LLC
04 "Anti-Flood" (1.3.1-dev) by AlliedModders LLC
05 "Basic Ban Commands" (1.3.1-dev) by AlliedModders LLC
06 "Basic Chat" (1.3.1-dev) by AlliedModders LLC
07 "Basic Comm Control" (1.3.1-dev) by AlliedModders LLC
08 "Basic Commands" (1.3.1-dev) by AlliedModders LLC
09 "Basic Info Triggers" (1.3.1-dev) by AlliedModders LLC
10 "Basic Votes" (1.3.1-dev) by AlliedModders LLC
11 "Client Preferences" (1.3.1-dev) by AlliedModders LLC
12 "Fun Commands" (1.3.1-dev) by AlliedModders LLC
13 "Fun Votes" (1.3.1-dev) by AlliedModders LLC
14 "Player Commands" (1.3.1-dev) by AlliedModders LLC
15 "Reserved Slots" (1.3.1-dev) by AlliedModders LLC
16 "Sound Commands" (1.3.1-dev) by AlliedModders LLC
17 <Error> "Custom Player Stats (1.4B46) by Mikko Andersson (Muuk)
18 Disabled: "nextmap" (1.3.1-dev) by AlliedModders LLC
Load Errors:
Custom Player Stats: Error detected in plugin startup (see error logs)

the web interface ok but not the plugins fuinciona error here.
but so far failed connection.

I have a server apache 2 mysql 5 and php 5 linux ubuntu

months if anyone can help please.
:cry::cry::cry::cry::cry::cry:

muukis 01-23-2010 17:01

Re: [L4D & L4D2] Custom Player Stats v1.4B46
 
Quote:

Originally Posted by secfeniks (Post 1064842)
error log it appears that
L 01/23/2010 - 19:14:54: [l4d_stats.smx] Databases.cfg missing 'l4dstats' entry!
L 01/23/2010 - 19:14:54: [SM] Plugin encountered error 25: Call was aborted
L 01/23/2010 - 19:14:54: [SM] Native "SetFailState" reported: Connecting to database failed. Read error log for further details.
L 01/23/2010 - 19:14:54: [SM] Displaying call stack trace for plugin "l4d_stats.smx":
L 01/23/2010 - 19:14:54: [SM] [0] Line 537, / home/groups/alliedmodders/forums/files/5/2/0/8/2/57698.attach: OnPluginStart ( )

You have forgotten to edit the databases.cfg file or you have a typo in your edit. Read the quick installation guide. That might help you out a bit.

punkrockerlocker 01-23-2010 19:38

Re: [L4D & L4D2] Custom Player Stats v1.4B46
 
Quote:

Originally Posted by muukis (Post 1064700)
The error logs are saying that you have not installed the tables, but the connetion is working. Your web browser won't execute the PHP-scripts unless you have a web server with PHP running.

The plugin and the webstats are not depending on each other, so you can have either of them running without the other. Both of them are depending on MySQL though and a correct version of stats DB. You have to have the DB fixed and ready for either of them to work. Easiest way to create the tables to the DB is by using the PHP-scripts. You can however, create the tables without the scripts. To do that, you'll have to examine the scripts and execute the queries manually from MySQL console.

If you have installed the PHP, try opening the webstats folder to a command prompt and execute ./php createtable.php. Not sure if that works?

You won't have the interface to browse your stats with the web interface, but you can start collecting data and see a little bit of it with the in-game stats interface... maybe this is your reason of not installing a web server?

Yeah I would just like to browse stats only in game. I have tried running \. php createtable.php and the error I get is: Failed to open createtable.php, error 2.

Is there any other way of executing the script? Or is it possible if you could manually upload those tables to me and I could just upload it to the server directory?

NaRyan 01-23-2010 23:22

Re: [L4D & L4D2] Custom Player Stats v1.4B46
 
Nice work on the plugin.
Got it working on 1st try, so good install guide too :)

I do have one request though.
Is it possible to add a time setting to the webstats?

As in able to set the time shown on the webstats by either + or - hours?

As my L4D2 server is in the UK, however the webpage hosting is somewhere in Europe.
And due to that it's time is different from the server by +1 hour.

So on the webstats pages it shows the last connected time like "Jan 24, 2010 4:59am (-2,740.00 seconds ago)"

When the time I was last on was really 03:59.

So due to that it makes players show as last online in the future. :)

Thanks

Paco 01-24-2010 00:07

Re: [L4D & L4D2] Custom Player Stats v1.4B46
 
When setting up the database with the createtables.php, I get the following:

Code:

Maps table created successfully!

Players table created successfully!

Specified key was too long; max key length is 1000 bytes

Maps data for L4D2 inserted successfully!

All tables created successfully!

Everything still seemed to work, so I created some stats by playing. We also had some fun and spawned a bunch of extra things just to play around, then were going to reset the stats.

So, I tried the command to clear the stats: sm_rank_clear

This is what I got back:

Code:

20:47:35 [RANK] Clear Stats: Started clearing the database!
        [RANK] Clear Stats: Fast query failed! (Error = "Table 'l4d2stat.timedmaps' doesn't exist") Query = "DELETE FROM timedmaps"
20:47:35 L 01/24/2010 - 11:56:25: [l4d_stats.smx] Fast query failed! (Error = "Table 'l4d2stat.timedmaps' doesn't exist") Query = "DELETE FROM timedmaps"
20:47:35 [RANK] Clear Stats: Clearing timedmaps table failed. Executing rollback...
        [RANK] Clear Stats: Failure!

So, it looks like all the tables weren't created. What tables are supposed to be created (I suppose I could look in the php file that creates them and hunt it down, but thought I'd ask here first).

Any help is appriciated. I'm dropped the tables and started fresh, but still got that first error.


Thanks! ;)

punkrockerlocker 01-24-2010 01:20

Re: [L4D & L4D2] Custom Player Stats v1.4B46
 
Hi Muukis

Forget about my previous post. I managed to create the tables successfully! Just one last thing, how do I add full read/write permission or chmod 777 awards_cache file?

Paco 01-24-2010 02:53

Re: [L4D & L4D2] Custom Player Stats v1.4B46
 
Quote:

Originally Posted by Paco (Post 1065282)
When setting up the database with the createtables.php, I get the following:

Code:

Maps table created successfully!

Players table created successfully!

Specified key was too long; max key length is 1000 bytes

Maps data for L4D2 inserted successfully!

All tables created successfully!

Everything still seemed to work, so I created some stats by playing. We also had some fun and spawned a bunch of extra things just to play around, then were going to reset the stats.

So, I tried the command to clear the stats: sm_rank_clear

This is what I got back:

Code:

20:47:35 [RANK] Clear Stats: Started clearing the database!
        [RANK] Clear Stats: Fast query failed! (Error = "Table 'l4d2stat.timedmaps' doesn't exist") Query = "DELETE FROM timedmaps"
20:47:35 L 01/24/2010 - 11:56:25: [l4d_stats.smx] Fast query failed! (Error = "Table 'l4d2stat.timedmaps' doesn't exist") Query = "DELETE FROM timedmaps"
20:47:35 [RANK] Clear Stats: Clearing timedmaps table failed. Executing rollback...
        [RANK] Clear Stats: Failure!

So, it looks like all the tables weren't created. What tables are supposed to be created (I suppose I could look in the php file that creates them and hunt it down, but thought I'd ask here first).

Any help is appriciated. I'm dropped the tables and started fresh, but still got that first error.


Thanks! ;)


Ok, I manually added this table after finding it in the createtables.php file:
Code:

CREATE TABLE `timedmaps` (
  `map` varchar(255) NOT NULL,
  `gamemode` int(1) unsigned NOT NULL,
  `difficulty` int(1) unsigned NOT NULL,
  `steamid` varchar(255) NOT NULL,
  `plays` int(11) NOT NULL,
  `time` double NOT NULL,
  `players` int(2) NOT NULL,
  `modified` datetime NOT NULL,
  `created` date NOT NULL,
  PRIMARY KEY (`map`,`gamemode`,`difficulty`,`steamid`)
);

I changed the encoding/collation for `map` varchar(255) NOT NULL and `steamid` varchar(255) NOT NULL to latin1 and it accepted it..........hope this works right now.


Any MySQL guru's out there?


All times are GMT -4. The time now is 03:48.

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