AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   HLstatsX:CE (https://forums.alliedmods.net/forumdisplay.php?f=156)
-   -   Installing HLstatsx issues (https://forums.alliedmods.net/showthread.php?t=313199)

g0nz0uk 12-31-2018 08:21

Installing HLstatsx issues
 
Hello,

I've been running a HL Deathmatch server for a while now, however it's on Windows 2003 32bit, so I've built a Windows 2012R2 64bit server (have a OS license) and I've got the server up and running again. However the HLstats I've not managed to get setup at all, I made no notes years ago either.

I've installed MySQL and have tried to import the install.sql

I had to create the database first via the MySQL Shell:

Quote:

mysql> create database hlstatsx;
Query OK, 1 row affected (0.01 sec)

mysql>
Then via command line I tried to import the script to build the tables, but get an error:

Quote:

C:\Users\dummyaccount>mysql -u root -p hlstatsx < c:\hlstatsx\sql\install.sql
Enter password: *********
ERROR 1265 (01000) at line 65: Data truncated for column 'for_PlayerPlayerAction
s' at row 1
Any ideas what I'm doing wrong?

Thanks

NomisCZ 12-31-2018 12:34

Re: Installing HLstatsx issues
 
Hi,
try to create database in utf8mb4_unicode_ci / utf8mb4_general_ci collation. Then import database from sql file.

You can also try to import database via MySQL Workbench https://www.mysql.com/products/workbench/ or some MySQL "admin tool" (Navicat, HeidiSQL, ...)

Which version of the MySQL server do you use (5.6/5.7/8.x)?

g0nz0uk 12-31-2018 14:57

Re: Installing HLstatsx issues
 
Hi, used Workbench with utf8mb4_unicode_ci / utf8mb4_general_ci collation and got the same issues.

Using MySQL version 5.5

g0nz0uk 12-31-2018 15:06

Re: Installing HLstatsx issues
 
Tried this and got the same error:

CREATE DATABASE hlstatsx CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

NomisCZ 12-31-2018 15:20

Re: Installing HLstatsx issues
 
I tried to import install.sql on my local MySQL (Windows) and got the same error. So I imported it into Linux MySQL, then exported and now it works.

Same sql, only exported: https://ufile.io/2m8hh

g0nz0uk 12-31-2018 16:12

Re: Installing HLstatsx issues
 
Wow that worked! thanks, I wonder why.

Quote:

mysql> drop database hlstatsx;
Query OK, 3 rows affected (0.02 sec)

mysql> create database hlstatsx;
Query OK, 1 row affected (0.00 sec)

mysql>
Then ran your script:

Quote:

C:\hlstatsx\sql>mysql -uroot -p hlstatsx < test_stats.sql
Enter password: *********

C:\hlstatsx\sql>
:)

Now I need to remember how to setup the website and link to the DB :)

g0nz0uk 12-31-2018 16:51

Re: Installing HLstatsx issues
 
Website up now, however I can't seem to the file hlstats.pl

On my old server I double click it and all is ok, on this one nothing.

If I try from CMD:

Quote:

C:\hlstatsx\scripts>hlstats.pl
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/
^weapon { <-- HERE steam_id: 'STEAM_\d+:(.+?)', weapon_id: (\d+), class: \d+, t
eam: \d+, shots: \((\d+),(\d+)\), hits: \((\d+),(\d+)\), damage: \((\d+),(\d+)\)
, headshots: \((\d+),(\d+)\), kills: \(\d+,\d+\) }$/ at C:\hlstatsx\scripts\hlst
ats.pl line 3329.

C:\hlstatsx\scripts>
I've installed active perl too.

NomisCZ 12-31-2018 17:50

Re: Installing HLstatsx issues
 
Try this https://www.dropbox.com/s/1wix2t1ncx...tatsX.zip?dl=0

PHP Code:

perl hlstats.pl 


g0nz0uk 12-31-2018 18:39

Re: Installing HLstatsx issues
 
I've downloaded the Hlstatsx.zip are you asking me to replace my hlstats.pl file?

Thanks

NomisCZ 12-31-2018 18:52

Re: Installing HLstatsx issues
 
Yes, replace all files (if you didn't edit them). I think these are the fixed files I used before :-) (on Windows / Linux).


All times are GMT -4. The time now is 09:53.

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