AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Tech Support (https://forums.alliedmods.net/forumdisplay.php?f=36)
-   -   SuperHero MySQL save (https://forums.alliedmods.net/showthread.php?t=228417)

DOG09 10-19-2013 07:44

SuperHero MySQL save
 
Hey i'am trying to save xp to MySQL at first i created Database then i putet mysql to shconfig.cfg and changed plugins-superhero.ini to MySQL. Then i putet on server amx_shvaulttosql
Code:

Please wait while the XP data is copied
L 10/19/2013 - 14:43:46: [superheromodmysql.amxx] DEBUG: Error Loading MySQL XP for [BOT]Want_vip?_Write_/sms: [1146] 'Table 'np67233_xp.sh_savexp' doesn't exist' - 'SELECT `XP`, `HUDHELP`, `SKILL_COUNT` FROM `sh_savexp` WHERE `SH_KEY` = '[BOT]Want_vip?_Write_/sms''
L 10/19/2013 - 14:43:46: [superheromodmysql.amxx] DEBUG: Error Loading MySQL XP for [BOT]Foorum:_fixcs.net: [1146] 'Table 'np67233_xp.sh_savexp' doesn't exist' - 'SELECT `XP`, `HUDHELP`, `SKILL_COUNT` FROM `sh_savexp` WHERE `SH_KEY` = '[BOT]Foorum:_fixcs.net''
L 10/19/2013 - 14:43:46: [superheromodmysql.amxx] DEBUG: Error Loading MySQL XP for [BOT](1)Foorum:_fixcs.net: [1146] 'Table 'np67233_xp.sh_savexp' doesn't exist' - 'SELECT `XP`, `HUDHELP`, `SKILL_COUNT` FROM `sh_savexp` WHERE `SH_KEY` = '[BOT](1)Foorum:_fixcs.net''
L 10/19/2013 - 14:43:46: [superheromodmysql.amxx] DEBUG: Error Loading MySQL XP for c[F]L - qwer:): [1146] 'Table 'np67233_xp.sh_savexp' doesn't exist' - 'SELECT `XP`, `HUDHELP`, `SKILL_COUNT` FROM `sh_savexp` WHERE `SH_KEY` = 'c[F]L - qwer:)''
L 10/19/2013 - 14:43:46: [superheromodmysql.amxx] DEBUG: Error Loading MySQL XP for SoundWave mp.4: [1146] 'Table 'np67233_xp.sh_savexp' doesn't exist' - 'SELECT `XP`, `HUDHELP`, `SKILL_COUNT` FROM `sh_savexp` WHERE `SH_KEY` = 'SoundWave mp.4''

L 10/19/2013 - 14:43:46: [superheromodmysql.amxx] DEBUG: Error Loading MySQL XP for 1: [1146] 'Table 'np67233_xp.sh_savexp' doesn't exist' - 'SELECT `XP`, `HUDHELP`, `SKILL_COUNT` FROM `sh_savexp` WHERE `SH_KEY` = '1''
Saved XP has been copied from the vault to the MySQL Database Successfully

I checked phpmyadmin and there's nothing.. and when i made restart to the serve and waited to a second round to load XP it wouldn't load my XP-s, WHY?? Houpe you guys understand my problem.

DOG09 10-19-2013 07:51

Re: SuperHero MySQL save
 
and when i was trying to put these dabels to MYSQL it show's me error like:
Quote:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(30) NOT NULL,
`XP` int(10) NOT NULL default '0',
`HUDHELP` tinyint(3) unsig' at line 8

DOG09 10-19-2013 07:52

Re: SuperHero MySQL save
 
But it's default .sql what i taked from that vittu superhero post..

DOG09 10-19-2013 09:56

Re: SuperHero MySQL save
 
And now it show's me that:
Quote:

L 10/19/2013 - 16:54:08: [superheromodmysql.amxx] DEBUG: Error Loading MySQL XP for VorTeX: [1146] 'Table 'np67233_xp.sh_savexp' doesn't exist' - 'SELECT `XP`, `HUDHELP`, `SKILL_COUNT` FROM `sh_savexp` WHERE `SH_KEY` = 'VorTeX''
L 10/19/2013 - 16:54:08: [superheromodmysql.amxx] DEBUG: Error Loading MySQL XP for c[F]L - qwer:): [1146] 'Table 'np67233_xp.sh_savexp' doesn't exist' - 'SELECT `XP`, `HUDHELP`, `SKILL_COUNT` FROM `sh_savexp` WHERE `SH_KEY` = 'c[F]L - qwer:)''
but why it's not update my MySQL?

DOG09 10-19-2013 10:57

Re: SuperHero MySQL save
 
Quote:

#----------------------------------------------------
# Start: Create the tables
#----------------------------------------------------

CREATE TABLE IF NOT EXISTS `sh_savexp` (
`SH_KEY` varchar(32) binary NOT NULL default '',
`PLAYER_NAME` varchar(32) binary NOT NULL default '',
`LAST_PLAY_DATE` timestamp(30) NOT NULL,
`XP` int(10) NOT NULL default '0',
`HUDHELP` tinyint(3) unsigned NOT NULL default '1',
`SKILL_COUNT` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`SH_KEY`)
) TYPE=MyISAM COMMENT='SUPERHERO XP Saving Table';

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER ON `sh_savexp` TO np67233_xp;

CREATE TABLE IF NOT EXISTS `sh_saveskills` (
`SH_KEY` varchar(32) binary NOT NULL default '',
`SKILL_NUMBER` tinyint(3) unsigned NOT NULL default '0',
`HERO_NAME` varchar(25) NOT NULL default '',
PRIMARY KEY (`SH_KEY`,`SKILL_NUMBER`)
) TYPE=MyISAM COMMENT='SUPERHERO Skill Saving Table';

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER ON `sh_saveskills` TO np67233_xp;

FLUSH PRIVILEGES;

#----------------------------------------------------
# Stop
#----------------------------------------------------
Who can fix that? My database:
sh_mysql_host "localhost"
sh_mysql_user "np67233_xp"
sh_mysql_pass "Bans123"
sh_mysql_db "np67233_xp"
sh_mysql_persistent 0

DOG09 10-19-2013 11:33

Re: SuperHero MySQL save
 
Quote:

L 10/19/2013 - 18:31:50: [superheromodmysql.amxx] Exec: (2) Loading shconfig.cfg (message should be seen twice)
[SH] Successfully Loaded Superhero Config File
L 10/19/2013 - 18:31:50: [superheromodmysql.amxx] DEBUG: Error Making Tables: [1064] 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to us' - 'CREATE TABLE IF NOT EXISTS `sh_savexp` ( `SH_KEY` varchar(32) binary NOT NULL default '', `PLAYER_NAME` varchar(32) binary NOT NULL default '', `LAST_PLAY_DATE` timL 10/19/2013 - 18:31:50: [superheromodmysql.amxx] DEBUG: Couldn't Clean Powers: [1146] 'Table 'user236.sh_saveskills' doesn't exist' - 'DELETE FROM `sh_saveskills` USING `sh_saveskills`, `sh_savexp` WHERE sh_savexp.`SH_KEY` = sh_saveskills.`SH_KEY` AND sh_savexp.`LAST_PLAY_DATE` < (SYSDATE() - INTERVAL '14' DAY) AND NOT (sh_savexp.`HUDHELP` & '4')'
L 10/19/2013 - 18:31:50: Started map "de_dust2" (CRC "1159425449")

* Privileges set
this is from server....

Krillin 02-10-2014 01:06

Re: SuperHero MySQL save
 
In the SQL statements where you see
Code:

TYPE=MyISAM
Change them to:
Code:

ENGINE=MyISAM
This should allow SHM to write the tables to the database. This is an old problem with newer MySQL Server Engines 5.0 and above.

Hope this will help you or anyone else. We had to address this problem in 2009!

Best Regards,
Krillin

DOG09 05-03-2014 17:23

Re: SuperHero MySQL save
 
Thnx, working but now i got new error I did like
12, Close and ReOpen Server.

13, Join server, open console. Type: amx_shvaulttosql << TYPE IT ONLY ONCE!! Don't know why
but if vittu and jtp says so it gotta be right. So there ya go. You have now successfully installed mySQL xp saving.
and then i got error:
Quote:

L 05/04/2014 - 00:21:25: [superheromodmysql.amxx] DEBUG: MySQL connect error: [2002] 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' (,,)

DOG09 05-04-2014 07:57

Re: SuperHero MySQL save
 
Tried to make manual these tabels but:
Quote:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) NOT NULL,
`XP` int(10) NOT NULL default '0',
`HUDHELP` tinyint(6) unsigned' at line 14

DOG09 05-04-2014 08:36

Re: SuperHero MySQL save
 
My Database server:
Quote:

Server: Localhost via UNIX socket
Server type: MySQL
Server version: 5.5.35-log - MySQL Community Server (GPL)
Protocol version: 10
User: np67233_xp@localhost
Server charset: UTF-8 Unicode (utf8)
Web server:
Quote:

Apache/2
Database client version: libmysql - 5.5.35
PHP extension: mysqli Documentation
phpMyAdmin:
Quote:

Version information: 4.1.12, latest stable version: 4.1.14


All times are GMT -4. The time now is 17:59.

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