pawno\include\a_mysql.inc(36) : error 001: expected token: "-identifier-", but found "("
pawno\include\a_mysql.inc(37) : error 010: invalid function or declaration
pawno\include\a_mysql.inc(75) : warning 201: redefinition of constant/macro (symbol "mysql_reload(%0)")
pawno\include\a_mysql.inc(111) : error 021: symbol already defined: "mysql_connect"
pawno\include\a_mysql.inc(111) : error 025: function heading differs from prototype
pawno\include\a_mysql.inc(111) : error 025: function heading differs from prototype
pawno\include\a_mysql.inc(111) : fatal error 107: too many error messages on one line
static
mysql //This variable will be used to manage our database
;
static
mysql //This variable will be used to manage our database
;
public OnFilterScriptExit()
{
mysql_close();//close Mysql
IRC_Quit(gBotID[0], "Good Bye!"); // Disconnect the first bot
IRC_DestroyGroup(gGroupID);// Destroy the group
return 1;
}
forward AutoJoinChannels(botid);
public AutoJoinChannels(botid)
{
new
string[ 128 ], data[ 256 ], query[128];
format(mysql, query, sizeof(query), "SELECT * FROM `autojoin`");
mysql_store_result();
if (mysql_num_rows() > 0)
{
new count = 0;
while(mysql_fetch_row(data))
{
mysql_fetch_field("channel",data);
IRC_JoinChannel(botid, data);
printf("Channel: %s", data);
count++;
}
format(string, sizeof( string ), " 12* Version: %s", systemv);
IRC_GroupSay(gGroupID, IRC_CHANNEL, string);
if(!mysql_ping())
{
IRC_GroupSay(gGroupID, IRC_CHANNEL, "10* My7SQL: Connection is alive!");
}
else
{
IRC_GroupSay(gGroupID, IRC_CHANNEL, "10* My7SQL: Connection is dead!");
}
format(string, sizeof( string ), "13* Auto-Join: %d auto-join channels saved.", count);
IRC_GroupSay(gGroupID, IRC_CHANNEL, string);
format(string, sizeof( string ), "11* Admins: I've %d admin(s).", CountTotalAdmins());
IRC_GroupSay(gGroupID, IRC_CHANNEL, string);
format(string, sizeof( string ), "14* Plugins: Currently 4 plugins are loaded.");
IRC_GroupSay(gGroupID, IRC_CHANNEL, string);
}
mysql_free_result();
}
pawno\include\a_mysql.inc |
enum E_LOGLEVEL
{
LOG_NONE = 0,
LOG_ERROR = 1,
LOG_WARNING = 2,
LOG_DEBUG = 4,
LOG_ALL = LOG_ERROR | LOG_WARNING | LOG_DEBUG
};
#define mysql_reload(%0) mysql_tquery(%0,"FLUSH PRIVILEGES")
native mysql_connect(const host[], const user[], const database[], const password[], port = 3306, bool:autoreconnect = true, pool_size = 2);
#include <MySQL>
#include <a_MySQL>