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

[L4D] Player Stats (Co-op) v1.1.1


Post New Thread Reply   
 
Thread Tools Display Modes
gehn
New Member
Join Date: Jan 2009
Old 04-24-2009 , 14:53   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #381

we tried when the stats first came out. we had the same setup as you and it didnt work for us. interesting. oh well, we solved it either way.
gehn is offline
msleeper
Veteran Member
Join Date: May 2008
Location: Atlanta, Jawjuh
Old 04-24-2009 , 15:45   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #382

Quote:
Originally Posted by Spank View Post
I submitted a ticket, my reply:

So, that means, I'm screwing something up.
I wish I could be more help here but I don't know what to say. Sorry.

Quote:
Originally Posted by gehn View Post
Will the 1.1.0 stats web parts be upgradable to 1.2.0 or will we have to start from scratch? Thanks
If you are talking about the SQL setup script, that will work from any version upgrading to 1.2.0. It is a smart script, in that it detects what your current database layout is like and upgrades as necessary.

As for the rest of the webstats, the actual PHP and templates, everything should be upgradeable very easily. Unless you have done some major modification to your files or your templates, you can just remove your current install and extract the new webstats files, update your new config.php with your old info, and everything should work just fine. If you changed or are using custom template files, I will try to provide as much info as I can in the changelog so you can make the changes yourself.
__________________
msleeper is offline
gehn
New Member
Join Date: Jan 2009
Old 04-24-2009 , 15:48   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #383

our stuff is all vanilla. thanks for letting me know.
gehn is offline
msleeper
Veteran Member
Join Date: May 2008
Location: Atlanta, Jawjuh
Old 04-24-2009 , 15:52   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #384

Yeah, in that case the best and easiest thing is to just totally remove your old install, extract the new one, update your config.php and run the updater. You'll have less potential problems that way I think.
__________________
msleeper is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 04-24-2009 , 16:15   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #385

msleeper, did you notice what I mentioned about the createtable.php script? I don't know how you've been able to get that script to function correctly before because you do not have default values set for the fields and you insert rows without setting any values to those fields. I'm no SQL expert so I don't know if you can have some configuration in your DB that allows that. Normally (MySQL, Oracle, PostgreSQL, MSSQL) it does not.

Example... If your table the_table has fields text.varchar(256) NOT NULL and counter.int(10) NOT NULL, you can't just query "insert the_table (text) values ('something');". That query will fail because the counter does not have a default value set and it is not set in the query. You'll need either to alter the table so that the counter has a default value or allways have the query with all the fields like "insert the_table (text, counter) values ('something', 123);".

I attached the modified createtable.php in one of my previous posts. Never tried the script myself, since I altered the table manually.
muukis is offline
msleeper
Veteran Member
Join Date: May 2008
Location: Atlanta, Jawjuh
Old 04-24-2009 , 16:19   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #386

lol @ bolding random things

I'm not sure whose MySQL is misconfigured, mine or yours. The script works as-is on my web/db server. Come to think of it, every single script I have running there inserts into NOT NULL tables at some point or another. Give me a link to a MySQL article that says that syntax is wrong or that it shouldn't work and I'll update the script.

The number of people saying it's not working is way smaller than the number of people it has worked for, so I have to think that it's your MySQL that is misconfigured, or isn't configured to allow that insertion query.
__________________
msleeper is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 04-24-2009 , 17:05   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #387

They were not random things... did you try to comprehend my msg at all? (God knows I can be uncomprehensive sometimes )

I'm not being hostile here. Just... giving my 5 cents... that's all.

Ok... try this in your DB:

Run this first to create the example table...
Code:
CREATE TABLE `t_table` (
  `f_text` varchar(256) NOT NULL,
  `f_counter` int(10) NOT NULL,
  PRIMARY KEY  (`f_text`)
)
And then try running this query...
Code:
insert into t_table (f_text) values ('something');
See... no random bolding?

My MySQL gives me this error...
Code:
1364 - Field 'f_counter' doesn't have a default value
Using that error code, you can look up yourself the article from MySQL site, what went wrong.

In your scripts, you create the maps table like this...
Code:
$create_maps = "CREATE TABLE maps (
    name varchar(255) not null,
    playtime_nor int(11) not null,
    playtime_adv int(11) not null,
    playtime_exp int(11) not null,
    restarts_nor int(11) not null,
    restarts_adv int(11) not null,
    restarts_exp int(11) not null,
    points_nor int(11) not null,
    points_adv int(11) not null,
    points_exp int(11) not null,
    kills_nor int(11) not null,
    kills_adv int(11) not null,
    kills_exp int(11) not null,
    PRIMARY KEY (name)
);";
And then you try inserting rows into it like this...
Code:
INSERT INTO maps (name) VALUES ('l4d_airport01_greenhouse'),
('l4d_airport02_offices'),
('l4d_airport03_garage'),
('l4d_airport04_terminal'),
('l4d_airport05_runway'),
('l4d_farm01_hilltop'),
('l4d_farm02_traintunnel'),
('l4d_farm03_bridge'),
('l4d_farm04_barn'),
('l4d_farm05_cornfield'),
('l4d_hospital01_apartment'),
('l4d_hospital02_subway'),
('l4d_hospital03_sewers'),
('l4d_hospital04_interior'),
('l4d_hospital05_rooftop'),
('l4d_smalltown01_caves'),
('l4d_smalltown02_drainage'),
('l4d_smalltown03_ranchhouse'),
('l4d_smalltown04_mainstreet'),
('l4d_smalltown05_houseboat');";
Does not work... at least not in my DB (MySQL) that is.

Last edited by muukis; 04-24-2009 at 17:09.
muukis is offline
msleeper
Veteran Member
Join Date: May 2008
Location: Atlanta, Jawjuh
Old 04-24-2009 , 17:15   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #388

Quote:
Originally Posted by muukis View Post
They were not random things... did you try to comprehend my msg at all? (God knows I can be uncomprehensive sometimes )

I'm not being hostile here. Just... giving my 5 cents... that's all.

Ok... try this in your DB:

Run this first to create the example table...

And then try running this query...

See... no random bolding?

My MySQL gives me this error...
Code:
1364 - Field 'f_counter' doesn't have a default value
Using that error code, you can look up yourself the article from MySQL site, what went wrong.
Here's my exact mysql output.

PHP Code:
mysql> use f7lans_l4dstats;
Database changed
mysql
CREATE TABLE `t_table` (
    ->   `
f_textvarchar(256NOT NULL,
    ->   `
f_counterint(10NOT NULL,
    ->   
PRIMARY KEY  (`f_text`)
    -> );
Query OK0 rows affected (0.11 sec)

mysqlinsert into t_table (f_textvalues ('something');
Query OK1 row affected1 warning (0.00 sec)

mysqlselect from t_table;
+-----------+-----------+
f_text    f_counter |
+-----------+-----------+
something |         
+-----------+-----------+
1 row in set (0.00 sec)

mysql
No errors. I got a warning but that's it, and it obviously worked. I looked up that error code, I found this bug report: http://bugs.mysql.com/bug.php?id=38173

Quote:
The reason for the bug was incompatibile with the master side behaviour.
INSERT query on the master is allowed to insert into a table without specifying
values of DEFAULT-less fields as well provided that
sql_mode is not strict.
Either you have sql_mode set to strict, or you need to upgrade/update your MySQL.
__________________
msleeper is offline
muukis
Veteran Member
Join Date: Apr 2009
Old 04-24-2009 , 17:19   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #389

Ok that must be the reason. Still... My DB is a normal installation with no modifications to the configurations. All is working well for me right now, after I did those alters to the table. Sure I can hit the strict mode off, but it's better to leave it on in common sense... IMHO.

I'm just suggesting that you add those default values to the table. They wont harm the DB or the queries in any way and will lead you less of my kind of ppl bugging you.

EDIT:
Just so that you know...
Data Type Default Values

The strict mode is indeed the reason for my error. You can get rid of this error if you write correct SQL queries (by this I mean queries that wont throw errors or warnings) or alter the table to set default values. Anyways - I'm good with what I've got: I know how to fix it for myself.

Last edited by muukis; 04-25-2009 at 10:24.
muukis is offline
tsiedsma
Junior Member
Join Date: Apr 2009
Old 04-25-2009 , 01:26   Re: [L4D] Player Stats (Co-op) v1.1.1
Reply With Quote #390

Don't know if it's an issue with my config or not, but the plugin works great. The only issue I have is that Friendly Fire incidents are recorded twice. It even shows on the screen twice in game.

Also for those that want cheap external MySQL Hosting, check www.lithiumhosting.com $1.00 / month for more than enough Disk and Bandwidth. Plust Remote MySQL is allowed.

Feel free to try it for yourself
IP: 208.82.98.90 Port: 27015
tsiedsma 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 14:48.


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