Quote:
Originally Posted by Fastmancz
Hello,
thanks for your interesting plugin. I use MySQL and I have a problem - no table is created. I manually tried the SQL query.
CREATE TABLE IF NOT EXISTS leaderboard (id INTEGER PRIMARY KEY AUTOINCREMENT, name varchar(64) NOT NULL DEFAULT ' ', steamid varchar(64) NOT NULL UNIQUE, eligible_lr INTEGER DEFAULT '0', start_lr INTEGER DEFAULT '0', won_lr INTEGER DEFAULT '0', most_lr INTEGER DEFAULT '0', guards_beaten INTEGER DEFAULT '0')
#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 'AUTOINCREMENT, name varchar(64) NOT NULL DEFAULT ' ', steamid varchar(64) NOT NU' at line 1
Thanks for the quick fix.
|
Thank you for your comment.
The changes you make in database.cfg sometimes take two map changes or a server reboot to work.
My syntax is written for Sqlite. The syntax needs to be changed to work with mysql.
Change to sqlite, it should work. Tell me if you got it working or if you need help.
addons\sourcemod\configs\databases.cfg
PHP Code:
"lr-leaderboard"
{
"driver" "sqlite"
"host "localhost"
"database" "lr-leaderboard-sqlite"
"user" "root"
"pass" ""
}
__________________