[HELP]MySQL errors When Compiling
#1

pawn Код:
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
I got these errors when compiling the gm..
line 36:
PHP код:
static
    
mysql //This variable will be used to manage our database
    

(the MySQL written was on the line 36)
line 37:
PHP код:
static
    
mysql //This variable will be used to manage our database
    

(the ";" is on 37)
line 75:
PHP код:
public OnFilterScriptExit()
{
    
mysql_close();//close Mysql
    
IRC_Quit(gBotID[0], "Good Bye!"); // Disconnect the first bot
    
IRC_DestroyGroup(gGroupID);// Destroy the group
    
return 1;

The IRC_DestroyGroup(gGroupID); is on 75)
line 111:
PHP код:
forward AutoJoinChannels(botid);
public 
AutoJoinChannels(botid)
{
    new
        
string128 ], data256 ], query[128];
    
format(mysqlquerysizeof(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(botiddata);
            
printf("Channel: %s"data);
            
count++;
        }
        
format(stringsizeof( string ), " 12* Version: %s"systemv);
        
IRC_GroupSay(gGroupIDIRC_CHANNELstring);
         if(!
mysql_ping())
         {
            
IRC_GroupSay(gGroupIDIRC_CHANNEL"10* My7SQL: Connection is alive!");
         }
         else
        {
            
IRC_GroupSay(gGroupIDIRC_CHANNEL"10* My7SQL: Connection is dead!");
        }
        
format(stringsizeof( string ), "13* Auto-Join: %d auto-join channels saved."count);
        
IRC_GroupSay(gGroupIDIRC_CHANNELstring);
        
format(stringsizeof( string ), "11* Admins: I've %d admin(s)."CountTotalAdmins());
        
IRC_GroupSay(gGroupIDIRC_CHANNELstring);
        
format(stringsizeof( string ), "14* Plugins: Currently 4 plugins are loaded.");
        
IRC_GroupSay(gGroupIDIRC_CHANNELstring);
    }
    
mysql_free_result();

(the mysql_store_result(); is on 111)
Reply
#2

Quote:

pawno\include\a_mysql.inc

Errors don't come from your file, but from a_mysql (or is your file named a_mysql?)
Reply
#3

yeah u right they are from a_mysql.inc
can u help me in fixing them?
Reply
#4

I don't know what are the contents of that file, so sorry, no idea.
Reply
#5

Oh So Anyone there who can help me?
Reply
#6

From MySQL.inc
line 36
PHP код:
enum E_LOGLEVEL
{
    
LOG_NONE 0,
    
LOG_ERROR 1,
    
LOG_WARNING 2,
    
LOG_DEBUG 4,
    
    
LOG_ALL LOG_ERROR LOG_WARNING LOG_DEBUG
}; 
The LOG_ALL = LOG_ERROR | LOG_WARNING | LOG_DEBUG is on 36.
and the }; is on 37
line 75:
PHP код:
#define mysql_reload(%0)                             mysql_tquery(%0,"FLUSH PRIVILEGES") 
line 111:
PHP код:
native mysql_connect(const host[], const user[], const database[], const password[], port 3306bool:autoreconnect truepool_size 2); 
Reply
#7

Re-installing MySQL would help. Choose the latest version and make sure you replace the files.
https://github.com/pBlueG/SA-MP-MySQL/releases
I issued this before, too, but installing the latest version fixed it.

Also, make sure that 'a_mysql.inc' is loaded right after 'a_samp'.
Reply
#8

already did but still
Reply
#9

Quote:
Originally Posted by LazyBoyyyy
Посмотреть сообщение
already did but still
Do you include it twice or have in your gamemode some makros with the same name?
Reply
#10

yeah I am also using this https://sampforum.blast.hk/showthread.php?tid=122983
and I have
PHP код:
#include <MySQL> 
after the
PHP код:
#include <a_MySQL> 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)