#define SQL_HOST "localhost"
#define SQL_USER "root"
#define SQL_PASS ""
#define SQL_DB "gm"
static MySQL;
public OnGameModeInit()
{
MySQL = mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS); // This line
warning 213: tag mismatch
static DB:MySQL;
new query[200];
mysql_format(MySQL, query, sizeof(query), "UPDATE `Users` SET `Kills` = %d", GetPlayerScore(playerid)*2);
mysql_query(query);
error 035: argument type mismatch (argument 1)
mysql_query(query[], resultid, extraid, connectionHandle)
mysql_format(MySQL, query, sizeof(query), "UPDATE `Users` SET `Kills` = '%d'", GetPlayerScore(playerid)*2); mysql_query(,MySQL,query);
|
Also I've an another problem even if I check the wiki, I do the same the thing and I've an error.
|
|
Check the wiki on the link I posted, the other two pages that exist are for R5 to R6-2 and R33+
About the last post, the plugin failed to load. Is it Windows or Linux? If it is Windows, do you have libmysqld.dll and log-core.dll into the main directory? |
|
I wasn't on the correct version. I didn't saw it, my bad.
Windows! I have both of these file in the main directory (if you mean before folder plugins, pawno, etc...). |
|
Windows! I have both of these file in the main directory (if you mean before folder plugins, pawno, etc...).
|
|
Do you get a missing .dll file when starting the server? It requires Microsoft Visual C++ 2015 Redistributable Package (x86 version).
|
#define MYSQL_HOST "localhost"
#define MYSQL_USER "root"
#define MYSQL_DATABASE "myserver"
#define MYSQL_PASSWORD ""
static MySQL:MySQL;
public OnGameModeInit()
{
//mysql_log(LOG_ALL);
MySQL = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_DATABASE, MYSQL_PASSWORD);
if(mysql_errno() != 0)
{
printf("[MySQL] The connection has failed.");
}
else
{
printf("[MySQL] The connection was successful.");
}